aboutsummaryrefslogtreecommitdiffstats
path: root/ui/app/components/balance-component.js
diff options
context:
space:
mode:
authorDan <danjm.com@gmail.com>2017-09-15 19:23:12 +0800
committerChi Kei Chan <chikeichan@gmail.com>2017-09-16 07:10:34 +0800
commitab77142c90a532a775636cf20a7e23191ff47f8f (patch)
tree06259d88b23c456c6dd784a50b58d3a9631d5bea /ui/app/components/balance-component.js
parent5c86194c0ab99f36092a0121513a4114a703a71c (diff)
downloadtangerine-wallet-browser-ab77142c90a532a775636cf20a7e23191ff47f8f.tar
tangerine-wallet-browser-ab77142c90a532a775636cf20a7e23191ff47f8f.tar.gz
tangerine-wallet-browser-ab77142c90a532a775636cf20a7e23191ff47f8f.tar.bz2
tangerine-wallet-browser-ab77142c90a532a775636cf20a7e23191ff47f8f.tar.lz
tangerine-wallet-browser-ab77142c90a532a775636cf20a7e23191ff47f8f.tar.xz
tangerine-wallet-browser-ab77142c90a532a775636cf20a7e23191ff47f8f.tar.zst
tangerine-wallet-browser-ab77142c90a532a775636cf20a7e23191ff47f8f.zip
Show dollar sign before USD on account details page.
Diffstat (limited to 'ui/app/components/balance-component.js')
-rw-r--r--ui/app/components/balance-component.js8
1 files changed, 5 insertions, 3 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) {