diff options
Diffstat (limited to 'ui/app/util.js')
-rw-r--r-- | ui/app/util.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ui/app/util.js b/ui/app/util.js index 67b7c8f67..18862fade 100644 --- a/ui/app/util.js +++ b/ui/app/util.js @@ -71,7 +71,7 @@ function formatBalance(balance) { var padded = wei.toString(10) var len = padded.length var nonZeroIndex = padded.match(/[^0]/) && padded.match(/[^0]/).index - var beforeDecimal = padded.substr(nonZeroIndex ? nonZeroIndex : 0, len - 18) + var beforeDecimal = padded.substr(nonZeroIndex ? nonZeroIndex : 0, len - 18) || '0' var afterDecimal = padded.substr(len - 18, decimalsToKeep) return `${beforeDecimal}.${afterDecimal} ETH` } |