Skip to content

Commit cb27f25

Browse files
committed
fix: use createTransferCheckedInstruction
1 parent 8f77205 commit cb27f25

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

src/routes/mayan/MayanRouteBase.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import type { SuiClient } from '@mysten/sui/client';
1414
import { Transaction } from '@mysten/sui/transactions';
1515
import {
1616
createAssociatedTokenAccountIdempotentInstruction,
17-
createTransferInstruction,
17+
createTransferCheckedInstruction,
1818
getAssociatedTokenAddressSync,
1919
} from '@solana/spl-token';
2020
import type { Connection, TransactionInstruction } from '@solana/web3.js';
@@ -301,11 +301,13 @@ export class MayanRouteBase<N extends Network> extends routes.AutomaticRoute<
301301
}
302302

303303
instructions.push(
304-
createTransferInstruction(
304+
createTransferCheckedInstruction(
305305
senderAta,
306+
mint,
306307
referrerAta,
307308
sender,
308309
referralFee,
310+
source.decimals,
309311
undefined,
310312
tokenProgramId,
311313
),

0 commit comments

Comments
 (0)