File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -18,6 +18,7 @@ export function createMockRpc() {
1818 lastValidBlockHeight : 100 ,
1919 } ) ,
2020 sendRawTransaction : vi . fn ( ) . mockResolvedValue ( 'mock-signature-abc123' ) ,
21+ confirmTransaction : vi . fn ( ) . mockResolvedValue ( { } ) ,
2122 } ;
2223}
2324
Original file line number Diff line number Diff line change @@ -36,6 +36,7 @@ export async function signAndSendBatches(
3636 skipPreflight : false ,
3737 preflightCommitment : 'confirmed' ,
3838 } ) ;
39+ await rpc . confirmTransaction ( sig , 'confirmed' ) ;
3940 signatures . push ( sig ) ;
4041 }
4142
Original file line number Diff line number Diff line change @@ -51,7 +51,7 @@ const createLightTokenMint = async (
5151
5252 if ( initialAmount > 0 ) {
5353 const recipient = new PublicKey ( recipientAddress ) ;
54- const tokenAmount = BigInt ( initialAmount * Math . pow ( 10 , decimals ) ) ;
54+ const tokenAmount = BigInt ( Math . floor ( initialAmount * Math . pow ( 10 , decimals ) ) ) ;
5555
5656 // 1. Mint SPL/T22 tokens to payer's associated token account (payer can sign)
5757 const payerSplAta = await createAssociatedTokenAccount (
Original file line number Diff line number Diff line change @@ -28,7 +28,7 @@ const mintSplTokens = async (
2828
2929 const mint = new PublicKey ( mintAddress ) ;
3030 const recipient = new PublicKey ( recipientAddress ) ;
31- const tokenAmount = BigInt ( amount * Math . pow ( 10 , decimals ) ) ;
31+ const tokenAmount = BigInt ( Math . floor ( amount * Math . pow ( 10 , decimals ) ) ) ;
3232
3333 // Auto-detect token program (SPL vs T22) from mint account owner
3434 const mintAccountInfo = await connection . getAccountInfo ( mint ) ;
You can’t perform that action at this time.
0 commit comments