From 8834548b0153db35dfa56c0901a384bcf7e3e7b3 Mon Sep 17 00:00:00 2001 From: Frankie Date: Wed, 6 Jul 2016 19:13:14 -0700 Subject: [PATCH] Handle to small of balances with "<0.00001" --- ui/app/util.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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)}`