diff --git a/ui/app/components/pending-tx/confirm-send-token.js b/ui/app/components/pending-tx/confirm-send-token.js index 6fb4ddf70..a4c3d16e3 100644 --- a/ui/app/components/pending-tx/confirm-send-token.js +++ b/ui/app/components/pending-tx/confirm-send-token.js @@ -85,7 +85,9 @@ ConfirmSendToken.prototype.getAmount = function () { fiat: tokenExchangeRate ? +(sendTokenAmount * tokenExchangeRate * conversionRate).toFixed(2) : null, - token: +sendTokenAmount.toFixed(decimals), + token: typeof value === 'undefined' + ? 'Unknown' + : +sendTokenAmount.toFixed(decimals), } } @@ -213,8 +215,6 @@ ConfirmSendToken.prototype.renderTotalPlusGas = function () { const { fiat: fiatAmount, token: tokenAmount } = this.getAmount() const { fiat: fiatGas, token: tokenGas } = this.getGasFee() - const tokenTotal = addCurrencies(tokenAmount, tokenGas || '0') - return fiatAmount && fiatGas ? ( h('section.flex-row.flex-center.confirm-screen-total-box ', [ @@ -225,7 +225,7 @@ ConfirmSendToken.prototype.renderTotalPlusGas = function () { h('div.confirm-screen-section-column', [ h('div.confirm-screen-row-info', `${fiatAmount + fiatGas} ${currentCurrency}`), - h('div.confirm-screen-row-detail', `${tokenTotal} ${symbol}`), + h('div.confirm-screen-row-detail', `${addCurrencies(tokenAmount, tokenGas || '0')} ${symbol}`), ]), ]) ) @@ -321,7 +321,7 @@ ConfirmSendToken.prototype.render = function () { ]), ]), - h('section.flex-row.flex-center.confirm-screen-row', [ + toAddress && h('section.flex-row.flex-center.confirm-screen-row', [ h('span.confirm-screen-label.confirm-screen-section-column', [ 'To' ]), h('div.confirm-screen-section-column', [ h('div.confirm-screen-row-info', toName),