aboutsummaryrefslogtreecommitdiffstats
path: root/ui/app/components/eth-balance.js
diff options
context:
space:
mode:
authorFrankie <frankie.pangilinan@consensys.net>2016-08-20 08:18:11 +0800
committerFrankie <frankie.pangilinan@consensys.net>2016-08-20 08:18:11 +0800
commitedfb0eb96803e4f01a8d4880b44ad220ce4bbb9a (patch)
treeb79cefa5d9bda8034fe3f7b7e053021528d27613 /ui/app/components/eth-balance.js
parent30af7e96cba7a88d46d3376097e4d44b715f834c (diff)
downloadtangerine-wallet-browser-edfb0eb96803e4f01a8d4880b44ad220ce4bbb9a.tar
tangerine-wallet-browser-edfb0eb96803e4f01a8d4880b44ad220ce4bbb9a.tar.gz
tangerine-wallet-browser-edfb0eb96803e4f01a8d4880b44ad220ce4bbb9a.tar.bz2
tangerine-wallet-browser-edfb0eb96803e4f01a8d4880b44ad220ce4bbb9a.tar.lz
tangerine-wallet-browser-edfb0eb96803e4f01a8d4880b44ad220ce4bbb9a.tar.xz
tangerine-wallet-browser-edfb0eb96803e4f01a8d4880b44ad220ce4bbb9a.tar.zst
tangerine-wallet-browser-edfb0eb96803e4f01a8d4880b44ad220ce4bbb9a.zip
Fix issue where if given a balance that does not need to be parsed will not be parsed
Diffstat (limited to 'ui/app/components/eth-balance.js')
-rw-r--r--ui/app/components/eth-balance.js11
1 files changed, 6 insertions, 5 deletions
diff --git a/ui/app/components/eth-balance.js b/ui/app/components/eth-balance.js
index bb2dc9010..498873faa 100644
--- a/ui/app/components/eth-balance.js
+++ b/ui/app/components/eth-balance.js
@@ -15,8 +15,8 @@ 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 (
@@ -29,12 +29,13 @@ EthBalanceComponent.prototype.render = function () {
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',