diff options
Diffstat (limited to 'ui/app/components/customize-gas-modal')
-rw-r--r-- | ui/app/components/customize-gas-modal/index.js | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/ui/app/components/customize-gas-modal/index.js b/ui/app/components/customize-gas-modal/index.js index d8384c19d..e44675880 100644 --- a/ui/app/components/customize-gas-modal/index.js +++ b/ui/app/components/customize-gas-modal/index.js @@ -1,10 +1,10 @@ const Component = require('react').Component const h = require('react-hyperscript') const inherits = require('util').inherits -const connect = require('react-redux').connect +const connect = require('../../metamask-connect') const actions = require('../../actions') -const t = require('../../../i18n') const GasModalCard = require('./gas-modal-card') +const t = require('../../../i18n-helper').getMessage const ethUtil = require('ethereumjs-util') @@ -150,7 +150,7 @@ CustomizeGasModal.prototype.validate = function ({ gasTotal, gasLimit }) { }) if (!balanceIsSufficient) { - error = t('balanceIsInsufficientGas') + error = t(this.props.localeMessages, 'balanceIsInsufficientGas') } const gasLimitTooLow = gasLimit && conversionGreaterThan( @@ -166,7 +166,7 @@ CustomizeGasModal.prototype.validate = function ({ gasTotal, gasLimit }) { ) if (gasLimitTooLow) { - error = t('gasLimitTooLow') + error = t(this.props.localeMessages, 'gasLimitTooLow') } this.setState({ error }) @@ -259,7 +259,7 @@ CustomizeGasModal.prototype.render = function () { }, [ h('div.send-v2__customize-gas__header', {}, [ - h('div.send-v2__customize-gas__title', t('customGas')), + h('div.send-v2__customize-gas__title', t(this.props.localeMessages, 'customGas')), h('div.send-v2__customize-gas__close', { onClick: hideModal, @@ -275,8 +275,8 @@ CustomizeGasModal.prototype.render = function () { // max: 1000, step: multiplyCurrencies(MIN_GAS_PRICE_GWEI, 10), onChange: value => this.convertAndSetGasPrice(value), - title: t('gasPrice'), - copy: t('gasPriceCalculation'), + title: t(this.props.localeMessages, 'gasPrice'), + copy: t(this.props.localeMessages, 'gasPriceCalculation'), }), h(GasModalCard, { @@ -285,8 +285,8 @@ CustomizeGasModal.prototype.render = function () { // max: 100000, step: 1, onChange: value => this.convertAndSetGasLimit(value), - title: t('gasLimit'), - copy: t('gasLimitCalculation'), + title: t(this.props.localeMessages, 'gasLimit'), + copy: t(this.props.localeMessages, 'gasLimitCalculation'), }), ]), @@ -299,16 +299,16 @@ CustomizeGasModal.prototype.render = function () { h('div.send-v2__customize-gas__revert', { onClick: () => this.revert(), - }, [t('revert')]), + }, [t(this.props.localeMessages, 'revert')]), h('div.send-v2__customize-gas__buttons', [ h('div.send-v2__customize-gas__cancel.allcaps', { onClick: this.props.hideModal, - }, [t('cancel')]), + }, [t(this.props.localeMessages, 'cancel')]), h(`div.send-v2__customize-gas__save${error ? '__error' : ''}.allcaps`, { onClick: () => !error && this.save(newGasPrice, gasLimit, gasTotal), - }, [t('save')]), + }, [t(this.props.localeMessages, 'save')]), ]), ]), |