Skip to content

Commit

Permalink
fix MATIC test asset id (#110)
Browse files Browse the repository at this point in the history
  • Loading branch information
nooxx authored Jul 8, 2024
1 parent 9a64873 commit 827e927
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
16 changes: 8 additions & 8 deletions src/integrations/fb_signer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import { MaticTx } from "../types/matic";
export type AssetId =
| "SOL_TEST"
| "SOL"
| "ETH_TEST3"
| "ETH_TEST5"
| "ETH_TEST6"
| "ETH"
| "ATOM_COS_TEST"
Expand Down Expand Up @@ -85,12 +85,12 @@ export class FbSigner {
try {
const assetArgs = assetId
? {
assetId,
source: {
type: PeerType.VAULT_ACCOUNT,
id: this.vaultId.toString(),
},
}
assetId,
source: {
type: PeerType.VAULT_ACCOUNT,
id: this.vaultId.toString(),
},
}
: {};

const tx: TransactionArguments = {
Expand All @@ -115,7 +115,7 @@ export class FbSigner {
*/
public async signTypedMessage(
eip712message: any,
assetId: "ETH" | "ETH_TEST3" | "ETH_TEST6",
assetId: "ETH" | "ETH_TEST5" | "ETH_TEST6",
note?: string,
): Promise<TransactionResponse> {
try {
Expand Down
4 changes: 2 additions & 2 deletions src/services/matic.ts
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ export class MaticService extends Service {

const fbSigner = this.getFbSigner(integration);
const fbNote = note ? note : "MATIC tx from @kilnfi/sdk";
const fbTx = await fbSigner.sign(payload, this.testnet ? "ETH_TEST3" : "ETH", fbNote);
const fbTx = await fbSigner.sign(payload, this.testnet ? "ETH_TEST5" : "ETH", fbNote);
const { data } = await api.post<MaticSignedTx>(`/v1/matic/transaction/prepare`, {
unsigned_tx_serialized: tx.data.unsigned_tx_serialized,
r: `0x${fbTx?.signedMessages?.[0].signature.r}`,
Expand Down Expand Up @@ -163,7 +163,7 @@ export class MaticService extends Service {

const fbSigner = this.getFbSigner(integration);
const fbNote = note ? note : "MATIC tx from @kilnfi/sdk";
const assetId = this.testnet ? "ETH_TEST3" : "ETH";
const assetId = this.testnet ? "ETH_TEST5" : "ETH";
return await fbSigner.signAndBroadcastWith(
payload,
assetId,
Expand Down

0 comments on commit 827e927

Please sign in to comment.