diff options
author | Alexander Tseung <alextsg@users.noreply.github.com> | 2018-01-04 05:24:17 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-01-04 05:24:17 +0800 |
commit | be398500debacc4befcf7ba112204a12435b5dcc (patch) | |
tree | ca2dd43ac020dee652fc65330396689613a3298c /ui/app/util.js | |
parent | 409d1d30e9d836926e5361fb9e4b5b025b66e313 (diff) | |
parent | dc9d8b24c6fccd584975c5b9f25c8090b7e8051d (diff) | |
download | tangerine-wallet-browser-be398500debacc4befcf7ba112204a12435b5dcc.tar.gz tangerine-wallet-browser-be398500debacc4befcf7ba112204a12435b5dcc.tar.zst tangerine-wallet-browser-be398500debacc4befcf7ba112204a12435b5dcc.zip |
Merge pull request #2848 from MetaMask/NewUI-flat
[NewUI] Merge NewUI-flat into uat
Diffstat (limited to 'ui/app/util.js')
-rw-r--r-- | ui/app/util.js | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/ui/app/util.js b/ui/app/util.js index 82a5f9f29..70c503550 100644 --- a/ui/app/util.js +++ b/ui/app/util.js @@ -211,6 +211,9 @@ function normalizeEthStringToWei (str) { while (decimal.length < 18) { decimal += '0' } + if (decimal.length > 18) { + decimal = decimal.slice(0, 18) + } const decimalBN = new ethUtil.BN(decimal, 10) eth = eth.add(decimalBN) } |