diff options
author | Dan Finlay <542863+danfinlay@users.noreply.github.com> | 2018-08-15 05:36:27 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-08-15 05:36:27 +0800 |
commit | d7aa1bf5c0ed4439526612cdf175db2d79e360cc (patch) | |
tree | 8e77e81bbe3b9b37613ef790d768008f7baa0f9b /ui/app/token-util.js | |
parent | 742aa8bb11c1273151ad907171061d4c5e4d1dca (diff) | |
parent | ebb23721ed2c350578283291ea65ef7bd81d62be (diff) | |
download | dexon-wallet-d7aa1bf5c0ed4439526612cdf175db2d79e360cc.tar.gz dexon-wallet-d7aa1bf5c0ed4439526612cdf175db2d79e360cc.tar.zst dexon-wallet-d7aa1bf5c0ed4439526612cdf175db2d79e360cc.zip |
Merge pull request #5060 from MetaMask/bignumber-string
Cast arguments for new Bignumbers() to string.
Diffstat (limited to 'ui/app/token-util.js')
-rw-r--r-- | ui/app/token-util.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ui/app/token-util.js b/ui/app/token-util.js index 0d423376..8798ed26 100644 --- a/ui/app/token-util.js +++ b/ui/app/token-util.js @@ -44,7 +44,7 @@ async function getSymbolAndDecimals (tokenAddress, existingTokens = []) { function calcTokenAmount (value, decimals) { const multiplier = Math.pow(10, Number(decimals || 0)) - return new BigNumber(value).div(multiplier).toNumber() + return new BigNumber(String(value)).div(multiplier).toNumber() } |