Show dollar sign before USD on account details page.

feature/default_network_editable
Dan 7 years ago committed by Chi Kei Chan
parent 5c86194c0a
commit ab77142c90
  1. 8
      ui/app/components/balance-component.js
  2. 2
      ui/app/components/tx-list-item.js

@ -88,15 +88,17 @@ BalanceComponent.prototype.renderFiatValue = function (formattedBalance) {
const fiatDisplayNumber = this.getFiatDisplayNumber(formattedBalance, conversionRate) const fiatDisplayNumber = this.getFiatDisplayNumber(formattedBalance, conversionRate)
return this.renderFiatAmount(fiatDisplayNumber, currentCurrency) const fiatPrefix = currentCurrency === 'USD' ? '$' : ''
return this.renderFiatAmount(fiatDisplayNumber, currentCurrency, fiatPrefix)
} }
BalanceComponent.prototype.renderFiatAmount = function (fiatDisplayNumber, fiatSuffix) { BalanceComponent.prototype.renderFiatAmount = function (fiatDisplayNumber, fiatSuffix, fiatPrefix) {
if (fiatDisplayNumber === 'N/A') return null if (fiatDisplayNumber === 'N/A') return null
return h('div.fiat-amount', { return h('div.fiat-amount', {
style: {}, style: {},
}, `${fiatDisplayNumber} ${fiatSuffix}`) }, `${fiatPrefix}${fiatDisplayNumber} ${fiatSuffix}`)
} }
BalanceComponent.prototype.getTokenBalance = function (formattedBalance, shorten) { BalanceComponent.prototype.getTokenBalance = function (formattedBalance, shorten) {

@ -74,7 +74,7 @@ TxListItem.prototype.getSendEtherTotal = function () {
return { return {
total: `${totalInETH} ETH`, total: `${totalInETH} ETH`,
fiatTotal: `${totalInUSD} USD`, fiatTotal: `$${totalInUSD} USD`,
} }
} }

Loading…
Cancel
Save