I’m trying to send custom coins (not just APT) on Aptos using a keyless wallet, but I keep getting InvalidCoinType or a BigInt related errorQuestion Title #670
-
Discord user IDkentwood261 Describe your question in detail.I’m trying to send custom coins (not just APT) on Aptos using a keyless wallet, but I keep getting InvalidCoinType or a BigInt related error What error, if any, are you getting?No response What have you tried or looked at? Or how can we reproduce the error?No response Which operating system are you using?macOS Which SDK or tool are you using? (if any)TypeScript SDK Describe your environment or tooling in detailNo response |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 4 replies
-
Base on what I understand this may happen because of 3 reasons: 1.Incorrect Coin Type Specified: Whenever you're sending a custom coin, you need to correctly specify the coin's type, which usually involves providing the full struct tag of the coin. So now try to double-check that you are using the exact, case-sensitive struct tag for the custom coin you are trying to send. Secondly
And thirdly
Hope this may help 🙏 |
Beta Was this translation helpful? Give feedback.
-
• Use a block explorer or the Aptos CLI to verify and confirm the exact coin type (struct tag) of the custom coin you are trying to send. |
Beta Was this translation helpful? Give feedback.
-
Use BigInt when dealing with high-value transfers or coins with 18+ decimals:
|
Beta Was this translation helpful? Give feedback.
Use BigInt when dealing with high-value transfers or coins with 18+ decimals:
const rawAmount = BigInt(Math.floor(amount * 10 ** Number(decimal)));