diff options
author | Kevin Serrano <kevgagser@gmail.com> | 2016-07-19 02:47:40 +0800 |
---|---|---|
committer | Kevin Serrano <kevgagser@gmail.com> | 2016-07-19 02:47:40 +0800 |
commit | 609bd7d6e8b5e5afac7dab390d573ff38fc23290 (patch) | |
tree | 59585f0d9b9c1da6840b69f7c51456650e7de27f | |
parent | 046ca5787b4092c3f41560e2d0cb10826a56b9dc (diff) | |
parent | 2fc27314796427f4a3d9bfadf77dc1b0d6f317d4 (diff) | |
download | tangerine-wallet-browser-609bd7d6e8b5e5afac7dab390d573ff38fc23290.tar tangerine-wallet-browser-609bd7d6e8b5e5afac7dab390d573ff38fc23290.tar.gz tangerine-wallet-browser-609bd7d6e8b5e5afac7dab390d573ff38fc23290.tar.bz2 tangerine-wallet-browser-609bd7d6e8b5e5afac7dab390d573ff38fc23290.tar.lz tangerine-wallet-browser-609bd7d6e8b5e5afac7dab390d573ff38fc23290.tar.xz tangerine-wallet-browser-609bd7d6e8b5e5afac7dab390d573ff38fc23290.tar.zst tangerine-wallet-browser-609bd7d6e8b5e5afac7dab390d573ff38fc23290.zip |
Merge branch 'AustP-master'
-rw-r--r-- | ui/app/util.js | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/ui/app/util.js b/ui/app/util.js index a08006077..84680fd06 100644 --- a/ui/app/util.js +++ b/ui/app/util.js @@ -96,7 +96,7 @@ function formatBalance (balance, decimalsToKeep) { var parsed = parseBalance(balance) var beforeDecimal = parsed[0] var afterDecimal = parsed[1] - var formatted = 'None' + var formatted if (decimalsToKeep === undefined) { if (beforeDecimal === '0') { if (afterDecimal !== '0') { @@ -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)}` } |