Skip to content

Commit 86b5bbd

Browse files
author
tilo-14
committed
fix devins
1 parent 71f3d53 commit 86b5bbd

4 files changed

Lines changed: 4 additions & 2 deletions

File tree

privy/react/src/hooks/__tests__/mock-rpc.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff 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

privy/react/src/hooks/signAndSendBatches.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff 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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff 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(

privy/scripts/src/mint-spl.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff 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);

0 commit comments

Comments
 (0)