aboutsummaryrefslogtreecommitdiffstats
path: root/ui/app/token-util.js
diff options
context:
space:
mode:
authorDan Finlay <542863+danfinlay@users.noreply.github.com>2018-08-15 05:36:27 +0800
committerGitHub <noreply@github.com>2018-08-15 05:36:27 +0800
commitd7aa1bf5c0ed4439526612cdf175db2d79e360cc (patch)
tree8e77e81bbe3b9b37613ef790d768008f7baa0f9b /ui/app/token-util.js
parent742aa8bb11c1273151ad907171061d4c5e4d1dca (diff)
parentebb23721ed2c350578283291ea65ef7bd81d62be (diff)
downloaddexon-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.js2
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()
}