Closed pedrouid closed 4 years ago
Forgot to mention this happens with SDK outside the playground too. Using the latest version (v1.1.0)
Can you try to use bn.js
instead of number
type?
const value = new BN('20000000000000000000', 10);
That worked. It also works if I pass the number as a string too.
The assertion failed issue comes from anyToBN method from the utils library which doesnt accept a number
On Rinkeby, using the playground with the account address
0x2AC21C80e9bA7f8FB21e18086D439ccdc9DE823A
, I'm getting an error sayingAssertion failed
when estimating topup virtual balance.This only happens when a tokenAddress is passed and not with ETH.
Example code