aboutsummaryrefslogtreecommitdiffstats
path: root/ui/app/components/pending-tx/confirm-send-token.js
diff options
context:
space:
mode:
Diffstat (limited to 'ui/app/components/pending-tx/confirm-send-token.js')
-rw-r--r--ui/app/components/pending-tx/confirm-send-token.js26
1 files changed, 13 insertions, 13 deletions
diff --git a/ui/app/components/pending-tx/confirm-send-token.js b/ui/app/components/pending-tx/confirm-send-token.js
index 356da36c3..42b676954 100644
--- a/ui/app/components/pending-tx/confirm-send-token.js
+++ b/ui/app/components/pending-tx/confirm-send-token.js
@@ -89,7 +89,7 @@ ConfirmSendToken.prototype.getAmount = function () {
}
ConfirmSendToken.prototype.getGasFee = function () {
- const { conversionRate, tokenExchangeRate, token } = this.props
+ const { conversionRate, tokenExchangeRate, token, currentCurrency } = this.props
const txMeta = this.gatherTxMeta()
const txParams = txMeta.txParams || {}
const { decimals } = token
@@ -101,12 +101,12 @@ ConfirmSendToken.prototype.getGasFee = function () {
multiplierBase: 16,
})
- const USD = conversionUtil(gasTotal, {
+ const FIAT = conversionUtil(txFeeBn, {
fromNumericBase: 'BN',
toNumericBase: 'dec',
fromDenomination: 'WEI',
fromCurrency: 'ETH',
- toCurrency: 'USD',
+ toCurrency: currentCurrency,
numberOfDecimals: 2,
conversionRate,
})
@@ -131,7 +131,7 @@ ConfirmSendToken.prototype.getGasFee = function () {
})
return {
- fiat: +Number(USD).toFixed(2),
+ fiat: +Number(FIAT).toFixed(2),
eth: ETH,
token: tokenExchangeRate
? tokenGas
@@ -160,7 +160,7 @@ ConfirmSendToken.prototype.getData = function () {
}
ConfirmSendToken.prototype.renderHeroAmount = function () {
- const { token: { symbol } } = this.props
+ const { token: { symbol }, currentCurrency } = this.props
const { fiat: fiatAmount, token: tokenAmount } = this.getAmount()
const txMeta = this.gatherTxMeta()
const txParams = txMeta.txParams || {}
@@ -169,8 +169,8 @@ ConfirmSendToken.prototype.renderHeroAmount = function () {
return fiatAmount
? (
h('div.confirm-send-token__hero-amount-wrapper', [
- h('h3.flex-center.confirm-screen-send-amount', `$${fiatAmount}`),
- h('h3.flex-center.confirm-screen-send-amount-currency', 'USD'),
+ h('h3.flex-center.confirm-screen-send-amount', `${fiatAmount}`),
+ h('h3.flex-center.confirm-screen-send-amount-currency', currentCurrency),
h('div.flex-center.confirm-memo-wrapper', [
h('h3.confirm-screen-send-memo', [ memo ? `"${memo}"` : '' ]),
]),
@@ -188,14 +188,14 @@ ConfirmSendToken.prototype.renderHeroAmount = function () {
}
ConfirmSendToken.prototype.renderGasFee = function () {
- const { token: { symbol } } = this.props
+ const { token: { symbol }, currentCurrency } = this.props
const { fiat: fiatGas, token: tokenGas, eth: ethGas } = this.getGasFee()
return (
h('section.flex-row.flex-center.confirm-screen-row', [
h('span.confirm-screen-label.confirm-screen-section-column', [ 'Gas Fee' ]),
h('div.confirm-screen-section-column', [
- h('div.confirm-screen-row-info', `$${fiatGas} USD`),
+ h('div.confirm-screen-row-info', `${fiatGas} ${currentCurrency}`),
h(
'div.confirm-screen-row-detail',
@@ -207,7 +207,7 @@ ConfirmSendToken.prototype.renderGasFee = function () {
}
ConfirmSendToken.prototype.renderTotalPlusGas = function () {
- const { token: { symbol } } = this.props
+ const { token: { symbol }, currentCurrency } = this.props
const { fiat: fiatAmount, token: tokenAmount } = this.getAmount()
const { fiat: fiatGas, token: tokenGas } = this.getGasFee()
@@ -222,8 +222,8 @@ ConfirmSendToken.prototype.renderTotalPlusGas = function () {
]),
h('div.confirm-screen-section-column', [
- h('div.confirm-screen-row-info', `$${fiatAmount + fiatGas} USD`),
- h('div.confirm-screen-row-detail', `${tokenTotal} ${symbol}`),
+ h('div.confirm-screen-row-info', `${fiatAmount + fiatGas} ${currentCurrency}`),
+ h('div.confirm-screen-row-detail', `${tokenAmount + tokenGas} ${symbol}`),
]),
])
)
@@ -236,7 +236,7 @@ ConfirmSendToken.prototype.renderTotalPlusGas = function () {
h('div.confirm-screen-section-column', [
h('div.confirm-screen-row-info', `${tokenAmount} ${symbol}`),
- h('div.confirm-screen-row-detail', `+ ${fiatGas} USD Gas`),
+ h('div.confirm-screen-row-detail', `+ ${fiatGas} ${currentCurrency} Gas`),
]),
])
)