|
|
@ -15,8 +15,8 @@ function EthBalanceComponent () { |
|
|
|
EthBalanceComponent.prototype.render = function () { |
|
|
|
EthBalanceComponent.prototype.render = function () { |
|
|
|
var state = this.props |
|
|
|
var state = this.props |
|
|
|
var style = state.style |
|
|
|
var style = state.style |
|
|
|
|
|
|
|
var needsParse = this.props.needsParse !== undefined ? this.props.needsParse : true |
|
|
|
const value = formatBalance(state.value, 6) |
|
|
|
const value = formatBalance(state.value, 6, needsParse) |
|
|
|
var width = state.width |
|
|
|
var width = state.width |
|
|
|
|
|
|
|
|
|
|
|
return ( |
|
|
|
return ( |
|
|
@ -29,12 +29,13 @@ EthBalanceComponent.prototype.render = function () { |
|
|
|
display: 'inline', |
|
|
|
display: 'inline', |
|
|
|
width: width, |
|
|
|
width: width, |
|
|
|
}, |
|
|
|
}, |
|
|
|
}, this.renderBalance(value, state)), |
|
|
|
}, this.renderBalance(value)), |
|
|
|
]) |
|
|
|
]) |
|
|
|
|
|
|
|
|
|
|
|
) |
|
|
|
) |
|
|
|
} |
|
|
|
} |
|
|
|
EthBalanceComponent.prototype.renderBalance = function (value, state) { |
|
|
|
EthBalanceComponent.prototype.renderBalance = function (value) { |
|
|
|
|
|
|
|
var state = this.props |
|
|
|
if (value === 'None') return value |
|
|
|
if (value === 'None') return value |
|
|
|
var balanceObj = generateBalanceObject(value, state.shorten ? 1 : 3) |
|
|
|
var balanceObj = generateBalanceObject(value, state.shorten ? 1 : 3) |
|
|
|
var balance |
|
|
|
var balance |
|
|
@ -68,7 +69,7 @@ EthBalanceComponent.prototype.renderBalance = function (value, state) { |
|
|
|
width: '100%', |
|
|
|
width: '100%', |
|
|
|
textAlign: 'right', |
|
|
|
textAlign: 'right', |
|
|
|
}, |
|
|
|
}, |
|
|
|
}, balance), |
|
|
|
}, this.props.incoming ? `+${balance}` : balance), |
|
|
|
h('div', { |
|
|
|
h('div', { |
|
|
|
style: { |
|
|
|
style: { |
|
|
|
color: ' #AEAEAE', |
|
|
|
color: ' #AEAEAE', |
|
|
|