diff options
author | Dan Finlay <dan@danfinlay.com> | 2016-08-17 06:41:11 +0800 |
---|---|---|
committer | Dan Finlay <dan@danfinlay.com> | 2016-08-17 06:41:11 +0800 |
commit | 4ba90969ee8fa9b9e21e88f5c6f0d646874049a3 (patch) | |
tree | 8b6f9423b1895aa7973737315857066a56855621 /ui/app/util.js | |
parent | 5479509618e601391586d0851acee4e408523c4f (diff) | |
parent | 90d6bec3ed51ba4b2d4696132642a4d97712dec9 (diff) | |
download | tangerine-wallet-browser-4ba90969ee8fa9b9e21e88f5c6f0d646874049a3.tar.gz tangerine-wallet-browser-4ba90969ee8fa9b9e21e88f5c6f0d646874049a3.tar.zst tangerine-wallet-browser-4ba90969ee8fa9b9e21e88f5c6f0d646874049a3.zip |
Merge branch 'master' into PopupNotifications
Diffstat (limited to 'ui/app/util.js')
-rw-r--r-- | ui/app/util.js | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/ui/app/util.js b/ui/app/util.js index 04ebcecdb..e1fd6e399 100644 --- a/ui/app/util.js +++ b/ui/app/util.js @@ -145,6 +145,8 @@ function shortenBalance (balance, decimalsToKeep = 1) { } else if (convertedBalance > 1000) { truncatedValue = (balance / 1000).toFixed(decimalsToKeep) return `>${truncatedValue}k` + } else if (convertedBalance === 0) { + return '0' } else if (convertedBalance < 1) { var exponent = balance.match(/\.0*/)[0].length truncatedValue = (convertedBalance * Math.pow(10, exponent)).toFixed(decimalsToKeep) |