diff options
author | Aust <AustP@users.noreply.github.com> | 2016-07-18 23:54:06 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-07-18 23:54:06 +0800 |
commit | 061633bf6725422bfb3f35bf3fdb17b514669357 (patch) | |
tree | 71cc5af2b8e3bf56ae620f728f40d9a951e093f7 | |
parent | 667483ac2037bef5b412ce33f0d9bb0605d6c13b (diff) | |
download | tangerine-wallet-browser-061633bf6725422bfb3f35bf3fdb17b514669357.tar tangerine-wallet-browser-061633bf6725422bfb3f35bf3fdb17b514669357.tar.gz tangerine-wallet-browser-061633bf6725422bfb3f35bf3fdb17b514669357.tar.bz2 tangerine-wallet-browser-061633bf6725422bfb3f35bf3fdb17b514669357.tar.lz tangerine-wallet-browser-061633bf6725422bfb3f35bf3fdb17b514669357.tar.xz tangerine-wallet-browser-061633bf6725422bfb3f35bf3fdb17b514669357.tar.zst tangerine-wallet-browser-061633bf6725422bfb3f35bf3fdb17b514669357.zip |
Make zero balance display 0. Fixes #449
-rw-r--r-- | ui/app/util.js | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/ui/app/util.js b/ui/app/util.js index a08006077..4655d63dc 100644 --- a/ui/app/util.js +++ b/ui/app/util.js @@ -123,7 +123,11 @@ function generateBalanceObject (formattedBalance, decimalsToKeep = 1) { var shortBalance = shortenBalance(balance, decimalsToKeep) if (beforeDecimal === '0' && afterDecimal.substr(0, 5) === '00000') { - balance = '<1.0e-5' + if (afterDecimal == 0) { + balance = '0' + } else { + balance = '<1.0e-5' + } } else if (beforeDecimal !== '0') { balance = `${beforeDecimal}.${afterDecimal.slice(0, decimalsToKeep)}` } |