aboutsummaryrefslogtreecommitdiffstats
path: root/ui/app/components/customize-gas-modal
diff options
context:
space:
mode:
authorDan <danjm.com@gmail.com>2018-03-14 10:32:27 +0800
committerDan <danjm.com@gmail.com>2018-03-14 10:32:27 +0800
commit798988597bd17aa73d7a20502905a453f1d51ba4 (patch)
tree69f083adbe19ce4e5b8094f1004cb1fd3a3f75c9 /ui/app/components/customize-gas-modal
parentcc267d6c818c83b0384b569733d05efef384ac3e (diff)
parent5fbfb0b67c9eb50b6cc503e78154ab237d2d9731 (diff)
downloadtangerine-wallet-browser-798988597bd17aa73d7a20502905a453f1d51ba4.tar
tangerine-wallet-browser-798988597bd17aa73d7a20502905a453f1d51ba4.tar.gz
tangerine-wallet-browser-798988597bd17aa73d7a20502905a453f1d51ba4.tar.bz2
tangerine-wallet-browser-798988597bd17aa73d7a20502905a453f1d51ba4.tar.lz
tangerine-wallet-browser-798988597bd17aa73d7a20502905a453f1d51ba4.tar.xz
tangerine-wallet-browser-798988597bd17aa73d7a20502905a453f1d51ba4.tar.zst
tangerine-wallet-browser-798988597bd17aa73d7a20502905a453f1d51ba4.zip
Merge branch 'master' into retry-tx-refractor
Diffstat (limited to 'ui/app/components/customize-gas-modal')
-rw-r--r--ui/app/components/customize-gas-modal/index.js25
1 files changed, 13 insertions, 12 deletions
diff --git a/ui/app/components/customize-gas-modal/index.js b/ui/app/components/customize-gas-modal/index.js
index 2bac57253..291447bb4 100644
--- a/ui/app/components/customize-gas-modal/index.js
+++ b/ui/app/components/customize-gas-modal/index.js
@@ -3,6 +3,7 @@ const h = require('react-hyperscript')
const inherits = require('util').inherits
const connect = require('react-redux').connect
const actions = require('../../actions')
+const t = require('../../../i18n')
const GasModalCard = require('./gas-modal-card')
const ethUtil = require('ethereumjs-util')
@@ -149,7 +150,7 @@ CustomizeGasModal.prototype.validate = function ({ gasTotal, gasLimit }) {
})
if (!balanceIsSufficient) {
- error = 'Insufficient balance for current gas total'
+ error = t('balanceIsInsufficientGas')
}
const gasLimitTooLow = gasLimit && conversionGreaterThan(
@@ -165,7 +166,7 @@ CustomizeGasModal.prototype.validate = function ({ gasTotal, gasLimit }) {
)
if (gasLimitTooLow) {
- error = 'Gas limit must be at least 21000'
+ error = t('gasLimitTooLow')
}
this.setState({ error })
@@ -253,7 +254,7 @@ CustomizeGasModal.prototype.render = function () {
}, [
h('div.send-v2__customize-gas__header', {}, [
- h('div.send-v2__customize-gas__title', 'Customize Gas'),
+ h('div.send-v2__customize-gas__title', t('customGas')),
h('div.send-v2__customize-gas__close', {
onClick: hideModal,
@@ -269,8 +270,8 @@ CustomizeGasModal.prototype.render = function () {
// max: 1000,
step: multiplyCurrencies(MIN_GAS_PRICE_GWEI, 10),
onChange: value => this.convertAndSetGasPrice(value),
- title: 'Gas Price (GWEI)',
- copy: 'We calculate the suggested gas prices based on network success rates.',
+ title: t('gasPrice'),
+ copy: t('gasPriceCalculation'),
}),
h(GasModalCard, {
@@ -279,8 +280,8 @@ CustomizeGasModal.prototype.render = function () {
// max: 100000,
step: 1,
onChange: value => this.convertAndSetGasLimit(value),
- title: 'Gas Limit',
- copy: 'We calculate the suggested gas limit based on network success rates.',
+ title: t('gasLimit'),
+ copy: t('gasLimitCalculation'),
}),
]),
@@ -293,16 +294,16 @@ CustomizeGasModal.prototype.render = function () {
h('div.send-v2__customize-gas__revert', {
onClick: () => this.revert(),
- }, ['Revert']),
+ }, [t('revert')]),
h('div.send-v2__customize-gas__buttons', [
- h('div.send-v2__customize-gas__cancel', {
+ h('div.send-v2__customize-gas__cancel.allcaps', {
onClick: this.props.hideModal,
- }, ['CANCEL']),
+ }, [t('cancel')]),
- h(`div.send-v2__customize-gas__save${error ? '__error' : ''}`, {
+ h(`div.send-v2__customize-gas__save${error ? '__error' : ''}.allcaps`, {
onClick: () => !error && this.save(gasPrice, gasLimit, gasTotal),
- }, ['SAVE']),
+ }, [t('save')]),
]),
]),