1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-12-23 09:52:26 +01:00

Show dollar sign before USD on account details page.

This commit is contained in:
Dan 2017-09-15 08:53:12 -02:30 committed by Chi Kei Chan
parent 5c86194c0a
commit ab77142c90
2 changed files with 6 additions and 4 deletions

View File

@ -88,15 +88,17 @@ BalanceComponent.prototype.renderFiatValue = function (formattedBalance) {
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
return h('div.fiat-amount', {
style: {},
}, `${fiatDisplayNumber} ${fiatSuffix}`)
}, `${fiatPrefix}${fiatDisplayNumber} ${fiatSuffix}`)
}
BalanceComponent.prototype.getTokenBalance = function (formattedBalance, shorten) {

View File

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