From ab77142c90a532a775636cf20a7e23191ff47f8f Mon Sep 17 00:00:00 2001 From: Dan Date: Fri, 15 Sep 2017 08:53:12 -0230 Subject: Show dollar sign before USD on account details page. --- ui/app/components/balance-component.js | 8 +++++--- ui/app/components/tx-list-item.js | 2 +- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/ui/app/components/balance-component.js b/ui/app/components/balance-component.js index 6d73d5b4a..d14aa675f 100644 --- a/ui/app/components/balance-component.js +++ b/ui/app/components/balance-component.js @@ -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) { diff --git a/ui/app/components/tx-list-item.js b/ui/app/components/tx-list-item.js index 70b4486dd..d45aea964 100644 --- a/ui/app/components/tx-list-item.js +++ b/ui/app/components/tx-list-item.js @@ -74,7 +74,7 @@ TxListItem.prototype.getSendEtherTotal = function () { return { total: `${totalInETH} ETH`, - fiatTotal: `${totalInUSD} USD`, + fiatTotal: `$${totalInUSD} USD`, } } -- cgit v1.2.3