Skip to content
Discussion options

You must be logged in to vote

Use BigInt when dealing with high-value transfers or coins with 18+ decimals:
const rawAmount = BigInt(Math.floor(amount * 10 ** Number(decimal)));

 const transaction = await aptos.transferCoinTransaction({
     amount: rawAmount,
     sender: keylessAccount.accountAddress,
     recipient,
     coinType,
   });

   const committedTxn = await aptos.signAndSubmitTransaction({
     signer: keylessAccount,
     transaction,
   });

   const committedTransactionResponse = await aptos.waitForTransaction({
     transactionHash: committedTxn.hash,
   });

Replies: 3 comments 4 replies

Comment options

You must be logged in to vote
2 replies
@Pcharlesme
Comment options

@Skamina
Comment options

Comment options

You must be logged in to vote
1 reply
@Pcharlesme
Comment options

Comment options

You must be logged in to vote
1 reply
@DefenceHack
Comment options

Answer selected by DefenceHack
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants