diff options
author | Dan Finlay <dan@danfinlay.com> | 2016-08-23 06:03:36 +0800 |
---|---|---|
committer | Dan Finlay <dan@danfinlay.com> | 2016-08-23 06:03:36 +0800 |
commit | 6e1000f361afcf259beb587d777f3025fcde7667 (patch) | |
tree | 758ddcf89896b8c7976347e9e2c97226378e05a6 /ui/app/components/account-eth-balance.js | |
parent | 270dbacbc472dae660fe8b143df9c64b7f8279cf (diff) | |
parent | 3756384da6cb7d1566271cb99ec561d3b051a4ac (diff) | |
download | tangerine-wallet-browser-6e1000f361afcf259beb587d777f3025fcde7667.tar.gz tangerine-wallet-browser-6e1000f361afcf259beb587d777f3025fcde7667.tar.zst tangerine-wallet-browser-6e1000f361afcf259beb587d777f3025fcde7667.zip |
Merge branch 'master' into PopupNotifications
Diffstat (limited to 'ui/app/components/account-eth-balance.js')
-rw-r--r-- | ui/app/components/account-eth-balance.js | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/ui/app/components/account-eth-balance.js b/ui/app/components/account-eth-balance.js index 6cdb33b73..8d693685f 100644 --- a/ui/app/components/account-eth-balance.js +++ b/ui/app/components/account-eth-balance.js @@ -46,16 +46,17 @@ EthBalanceComponent.prototype.render = function () { EthBalanceComponent.prototype.renderBalance = function (value, state) { if (value === 'None') return value var balanceObj = generateBalanceObject(value, state.shorten ? 1 : 3) - var balance, fiatNumber + var balance, fiatDisplayNumber, fiatTooltipNumber var splitBalance = value.split(' ') var ethNumber = splitBalance[0] var ethSuffix = splitBalance[1] if (state.conversionRate !== 0) { - fiatNumber = (Number(splitBalance[0]) * state.conversionRate).toFixed(2) + fiatTooltipNumber = Number(splitBalance[0]) * state.conversionRate + fiatDisplayNumber = fiatTooltipNumber.toFixed(2) } else { - fiatNumber = 'N/A' + fiatDisplayNumber = 'N/A' } var fiatSuffix = state.currentFiat @@ -99,16 +100,16 @@ EthBalanceComponent.prototype.renderBalance = function (value, state) { ]), h(Tooltip, { position: 'bottom', - title: `${fiatNumber} ${fiatSuffix}`, + title: `${fiatTooltipNumber} ${fiatSuffix}`, }, [ - fiatDisplay(fiatNumber, fiatSuffix), + fiatDisplay(fiatDisplayNumber, fiatSuffix), ]), ]) ) } -function fiatDisplay (fiatNumber, fiatSuffix) { - if (fiatNumber !== 'N/A') { +function fiatDisplay (fiatDisplayNumber, fiatSuffix) { + if (fiatDisplayNumber !== 'N/A') { return h('.flex-row', { style: { alignItems: 'flex-end', @@ -124,7 +125,7 @@ function fiatDisplay (fiatNumber, fiatSuffix) { fontSize: '12px', color: '#333333', }, - }, fiatNumber), + }, fiatDisplayNumber), h('div', { style: { color: '#AEAEAE', |