aboutsummaryrefslogtreecommitdiffstats
path: root/ui/app/components/eth-balance.js
diff options
context:
space:
mode:
authorDan Finlay <dan@danfinlay.com>2016-08-23 02:59:08 +0800
committerDan Finlay <dan@danfinlay.com>2016-08-23 02:59:08 +0800
commit3d451ddf3e59e8d4ac610b7e6a01a59beed4f944 (patch)
tree93193c3014065d00fc14d2efcdca8a11c63e2e4a /ui/app/components/eth-balance.js
parent8592ffd85582612ae18b5f4e5ed6749401f86f3b (diff)
parent3756384da6cb7d1566271cb99ec561d3b051a4ac (diff)
downloadtangerine-wallet-browser-3d451ddf3e59e8d4ac610b7e6a01a59beed4f944.tar
tangerine-wallet-browser-3d451ddf3e59e8d4ac610b7e6a01a59beed4f944.tar.gz
tangerine-wallet-browser-3d451ddf3e59e8d4ac610b7e6a01a59beed4f944.tar.bz2
tangerine-wallet-browser-3d451ddf3e59e8d4ac610b7e6a01a59beed4f944.tar.lz
tangerine-wallet-browser-3d451ddf3e59e8d4ac610b7e6a01a59beed4f944.tar.xz
tangerine-wallet-browser-3d451ddf3e59e8d4ac610b7e6a01a59beed4f944.tar.zst
tangerine-wallet-browser-3d451ddf3e59e8d4ac610b7e6a01a59beed4f944.zip
Merge branch 'master' into i390-TransactionLimit
Diffstat (limited to 'ui/app/components/eth-balance.js')
-rw-r--r--ui/app/components/eth-balance.js15
1 files changed, 8 insertions, 7 deletions
diff --git a/ui/app/components/eth-balance.js b/ui/app/components/eth-balance.js
index 6c324c947..498873faa 100644
--- a/ui/app/components/eth-balance.js
+++ b/ui/app/components/eth-balance.js
@@ -15,26 +15,27 @@ function EthBalanceComponent () {
EthBalanceComponent.prototype.render = function () {
var state = this.props
var style = state.style
-
- const value = formatBalance(state.value, 6)
+ var needsParse = this.props.needsParse !== undefined ? this.props.needsParse : true
+ const value = formatBalance(state.value, 6, needsParse)
var width = state.width
return (
- h('.ether-balance', {
+ h('.ether-balance.ether-balance-amount', {
style: style,
}, [
- h('.ether-balance-amount', {
+ h('div', {
style: {
display: 'inline',
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
var balanceObj = generateBalanceObject(value, state.shorten ? 1 : 3)
var balance
@@ -68,7 +69,7 @@ EthBalanceComponent.prototype.renderBalance = function (value, state) {
width: '100%',
textAlign: 'right',
},
- }, balance),
+ }, this.props.incoming ? `+${balance}` : balance),
h('div', {
style: {
color: ' #AEAEAE',