Simplify empty account balance rendering

This commit is contained in:
Dan Finlay 2016-07-05 15:16:40 -07:00
parent c4cbe3ad4c
commit 2c89cd722e
2 changed files with 2 additions and 2 deletions

View File

@ -142,7 +142,7 @@ describe('util', function() {
it('when given nothing', function() {
var result = util.formatBalance()
assert.equal(result, 'None', 'should return "None"')
assert.equal(result, '0 ETH', 'should return "0 ETH"')
})
it('should return eth as string followed by ETH', function() {

View File

@ -99,7 +99,7 @@ function formatBalance (balance, decimalsToKeep) {
var parsed = parseBalance(balance)
var beforeDecimal = parsed[0]
var afterDecimal = parsed[1]
var formatted = 'None'
var formatted = '0 ETH'
if (decimalsToKeep === undefined) {
if (beforeDecimal === '0') {
if (afterDecimal !== '0') {