aboutsummaryrefslogtreecommitdiffstats
path: root/ui
diff options
context:
space:
mode:
authorKevin Serrano <kevgagser@gmail.com>2016-07-19 02:32:29 +0800
committerKevin Serrano <kevgagser@gmail.com>2016-07-19 02:32:29 +0800
commit41aad32b1942fad37e98a2456486949b96a540ee (patch)
tree26f44e60aae90a378f0935d39496fb4817b1facc /ui
parent046ca5787b4092c3f41560e2d0cb10826a56b9dc (diff)
parentc1859a24eefd0bd8b1717d148e6f566df0007f31 (diff)
downloadtangerine-wallet-browser-41aad32b1942fad37e98a2456486949b96a540ee.tar
tangerine-wallet-browser-41aad32b1942fad37e98a2456486949b96a540ee.tar.gz
tangerine-wallet-browser-41aad32b1942fad37e98a2456486949b96a540ee.tar.bz2
tangerine-wallet-browser-41aad32b1942fad37e98a2456486949b96a540ee.tar.lz
tangerine-wallet-browser-41aad32b1942fad37e98a2456486949b96a540ee.tar.xz
tangerine-wallet-browser-41aad32b1942fad37e98a2456486949b96a540ee.tar.zst
tangerine-wallet-browser-41aad32b1942fad37e98a2456486949b96a540ee.zip
Merge branch 'master' of https://github.com/AustP/metamask-plugin into AustP-master
Diffstat (limited to 'ui')
-rw-r--r--ui/app/util.js7
1 files changed, 6 insertions, 1 deletions
diff --git a/ui/app/util.js b/ui/app/util.js
index a08006077..04ebcecdb 100644
--- a/ui/app/util.js
+++ b/ui/app/util.js
@@ -123,7 +123,12 @@ function generateBalanceObject (formattedBalance, decimalsToKeep = 1) {
var shortBalance = shortenBalance(balance, decimalsToKeep)
if (beforeDecimal === '0' && afterDecimal.substr(0, 5) === '00000') {
- balance = '<1.0e-5'
+ // eslint-disable-next-line eqeqeq
+ if (afterDecimal == 0) {
+ balance = '0'
+ } else {
+ balance = '<1.0e-5'
+ }
} else if (beforeDecimal !== '0') {
balance = `${beforeDecimal}.${afterDecimal.slice(0, decimalsToKeep)}`
}