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.js35
1 files changed, 17 insertions, 18 deletions
diff --git a/ui/app/components/pending-tx/confirm-send-token.js b/ui/app/components/pending-tx/confirm-send-token.js
index 54963ae9a..d53f8b32f 100644
--- a/ui/app/components/pending-tx/confirm-send-token.js
+++ b/ui/app/components/pending-tx/confirm-send-token.js
@@ -6,7 +6,6 @@ const tokenAbi = require('human-standard-token-abi')
const abiDecoder = require('abi-decoder')
abiDecoder.addABI(tokenAbi)
const actions = require('../../actions')
-const t = require('../../../i18n-helper').getMessage
const clone = require('clone')
const Identicon = require('../identicon')
const GasFeeDisplay = require('../send/gas-fee-display-v2.js')
@@ -22,7 +21,7 @@ const {
} = require('../../token-util')
const { MIN_GAS_PRICE_HEX } = require('../send/send-constants')
-
+//
const {
getTokenExchangeRate,
getSelectedAddress,
@@ -168,7 +167,7 @@ ConfirmSendToken.prototype.getAmount = function () {
? +(sendTokenAmount * tokenExchangeRate * conversionRate).toFixed(2)
: null,
token: typeof value === 'undefined'
- ? t(this.props.localeMessages, 'unknown')
+ ? this.props.t('unknown')
: +sendTokenAmount.toFixed(decimals),
}
@@ -240,7 +239,7 @@ ConfirmSendToken.prototype.getData = function () {
},
to: {
address: value,
- name: identities[value] ? identities[value].name : t(this.props.localeMessages, 'newRecipient'),
+ name: identities[value] ? identities[value].name : this.props.t('newRecipient'),
},
memo: txParams.memo || '',
}
@@ -286,7 +285,7 @@ ConfirmSendToken.prototype.renderGasFee = function () {
return (
h('section.flex-row.flex-center.confirm-screen-row', [
- h('span.confirm-screen-label.confirm-screen-section-column', [ t(this.props.localeMessages, 'gasFee') ]),
+ h('span.confirm-screen-label.confirm-screen-section-column', [ this.props.t('gasFee') ]),
h('div.confirm-screen-section-column', [
h(GasFeeDisplay, {
gasTotal: gasTotal || gasFeeInHex,
@@ -308,8 +307,8 @@ ConfirmSendToken.prototype.renderTotalPlusGas = function () {
? (
h('section.flex-row.flex-center.confirm-screen-row.confirm-screen-total-box ', [
h('div.confirm-screen-section-column', [
- h('span.confirm-screen-label', [ t(this.props.localeMessages, 'total') + ' ' ]),
- h('div.confirm-screen-total-box__subtitle', [ t(this.props.localeMessages, 'amountPlusGas') ]),
+ h('span.confirm-screen-label', [ this.props.t('total') + ' ' ]),
+ h('div.confirm-screen-total-box__subtitle', [ this.props.t('amountPlusGas') ]),
]),
h('div.confirm-screen-section-column', [
@@ -321,8 +320,8 @@ ConfirmSendToken.prototype.renderTotalPlusGas = function () {
: (
h('section.flex-row.flex-center.confirm-screen-row.confirm-screen-total-box ', [
h('div.confirm-screen-section-column', [
- h('span.confirm-screen-label', [ t(this.props.localeMessages, 'total') + ' ' ]),
- h('div.confirm-screen-total-box__subtitle', [ t(this.props.localeMessages, 'amountPlusGas') ]),
+ h('span.confirm-screen-label', [ this.props.t('total') + ' ' ]),
+ h('div.confirm-screen-total-box__subtitle', [ this.props.t('amountPlusGas') ]),
]),
h('div.confirm-screen-section-column', [
@@ -350,10 +349,10 @@ ConfirmSendToken.prototype.render = function () {
this.inputs = []
const isTxReprice = Boolean(txMeta.lastGasPrice)
- const title = isTxReprice ? t(this.props.localeMessages, 'reprice:title') : t(this.props.localeMessages, 'confirm')
+ const title = isTxReprice ? this.props.t('reprice:title') : this.props.t('confirm')
const subtitle = isTxReprice
- ? t(this.props.localeMessages, 'reprice:subtitle')
- : t(this.props.localeMessages, 'pleaseReviewTransaction')
+ ? this.props.t('reprice:subtitle')
+ : this.props.t('pleaseReviewTransaction')
return (
h('div.confirm-screen-container.confirm-send-token', [
@@ -362,7 +361,7 @@ ConfirmSendToken.prototype.render = function () {
h('div.page-container__header', [
!txMeta.lastGasPrice && h('button.confirm-screen-back-button', {
onClick: () => editTransaction(txMeta),
- }, t(this.props.localeMessages, 'edit')),
+ }, this.props.t('edit')),
h('div.page-container__title', title),
h('div.page-container__subtitle', subtitle),
]),
@@ -406,7 +405,7 @@ ConfirmSendToken.prototype.render = function () {
h('div.confirm-screen-rows', [
h('section.flex-row.flex-center.confirm-screen-row', [
- h('span.confirm-screen-label.confirm-screen-section-column', [ t(this.props.localeMessages, 'from') ]),
+ h('span.confirm-screen-label.confirm-screen-section-column', [ this.props.t('from') ]),
h('div.confirm-screen-section-column', [
h('div.confirm-screen-row-info', fromName),
h('div.confirm-screen-row-detail', `...${fromAddress.slice(fromAddress.length - 4)}`),
@@ -414,7 +413,7 @@ ConfirmSendToken.prototype.render = function () {
]),
toAddress && h('section.flex-row.flex-center.confirm-screen-row', [
- h('span.confirm-screen-label.confirm-screen-section-column', [ t(this.props.localeMessages, 'to') ]),
+ h('span.confirm-screen-label.confirm-screen-section-column', [ this.props.t('to') ]),
h('div.confirm-screen-section-column', [
h('div.confirm-screen-row-info', toName),
h('div.confirm-screen-row-detail', `...${toAddress.slice(toAddress.length - 4)}`),
@@ -436,10 +435,10 @@ ConfirmSendToken.prototype.render = function () {
// Cancel Button
h('button.btn-cancel.page-container__footer-button.allcaps', {
onClick: (event) => this.cancel(event, txMeta),
- }, t(this.props.localeMessages, 'cancel')),
+ }, this.props.t('cancel')),
// Accept Button
- h('button.btn-confirm.page-container__footer-button.allcaps', [t(this.props.localeMessages, 'confirm')]),
+ h('button.btn-confirm.page-container__footer-button.allcaps', [this.props.t('confirm')]),
]),
]),
]),
@@ -456,7 +455,7 @@ ConfirmSendToken.prototype.onSubmit = function (event) {
if (valid && this.verifyGasParams()) {
this.props.sendTransaction(txMeta, event)
} else {
- this.props.dispatch(actions.displayWarning(t(this.props.localeMessages, 'invalidGasParams')))
+ this.props.dispatch(actions.displayWarning(this.props.t('invalidGasParams')))
this.setState({ submitting: false })
}
}