aboutsummaryrefslogtreecommitdiffstats
path: root/ui/app/util.js
diff options
context:
space:
mode:
authorFrankie <frankie.pangilinan@consensys.net>2016-07-07 10:13:14 +0800
committerFrankie <frankie.pangilinan@consensys.net>2016-07-07 10:17:32 +0800
commit8834548b0153db35dfa56c0901a384bcf7e3e7b3 (patch)
treebf3995db0a57cc6c4500c944be9f6c575cb6dd06 /ui/app/util.js
parent525abb85d4848e2593f7ffaf4e462e067a64632f (diff)
downloadtangerine-wallet-browser-8834548b0153db35dfa56c0901a384bcf7e3e7b3.tar
tangerine-wallet-browser-8834548b0153db35dfa56c0901a384bcf7e3e7b3.tar.gz
tangerine-wallet-browser-8834548b0153db35dfa56c0901a384bcf7e3e7b3.tar.bz2
tangerine-wallet-browser-8834548b0153db35dfa56c0901a384bcf7e3e7b3.tar.lz
tangerine-wallet-browser-8834548b0153db35dfa56c0901a384bcf7e3e7b3.tar.xz
tangerine-wallet-browser-8834548b0153db35dfa56c0901a384bcf7e3e7b3.tar.zst
tangerine-wallet-browser-8834548b0153db35dfa56c0901a384bcf7e3e7b3.zip
Handle to small of balances with "<0.00001"
Diffstat (limited to 'ui/app/util.js')
-rw-r--r--ui/app/util.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/ui/app/util.js b/ui/app/util.js
index d9afa1bba..a09c180a1 100644
--- a/ui/app/util.js
+++ b/ui/app/util.js
@@ -105,7 +105,7 @@ function formatBalance (balance, decimalsToKeep) {
if (afterDecimal !== '0') {
var sigFigs = afterDecimal.match(/^0*(.{2})/) // default: grabs 2 most significant digits
if (sigFigs) { afterDecimal = sigFigs[0] }
- formattedBalance = `0.${afterDecimal.slice(0, 6)}`
+ formattedBalance = afterDecimal.substr(0, 5) === '00000' ? '<0.00001' : `0.${afterDecimal.slice(0, 6)}`
}
} else {
formattedBalance = `${beforeDecimal}.${afterDecimal.slice(0, 2)}`