aboutsummaryrefslogtreecommitdiffstats
path: root/ui/app/components/gas-customization/gas-modal-page-container/advanced-tab-content/advanced-tab-content.component.js
diff options
context:
space:
mode:
Diffstat (limited to 'ui/app/components/gas-customization/gas-modal-page-container/advanced-tab-content/advanced-tab-content.component.js')
-rw-r--r--ui/app/components/gas-customization/gas-modal-page-container/advanced-tab-content/advanced-tab-content.component.js24
1 files changed, 13 insertions, 11 deletions
diff --git a/ui/app/components/gas-customization/gas-modal-page-container/advanced-tab-content/advanced-tab-content.component.js b/ui/app/components/gas-customization/gas-modal-page-container/advanced-tab-content/advanced-tab-content.component.js
index 7c3142d0d..366ad88c9 100644
--- a/ui/app/components/gas-customization/gas-modal-page-container/advanced-tab-content/advanced-tab-content.component.js
+++ b/ui/app/components/gas-customization/gas-modal-page-container/advanced-tab-content/advanced-tab-content.component.js
@@ -17,7 +17,7 @@ export default class AdvancedTabContent extends Component {
customGasLimit: PropTypes.number,
gasEstimatesLoading: PropTypes.bool,
millisecondsRemaining: PropTypes.number,
- totalFee: PropTypes.string,
+ transactionFee: PropTypes.string,
timeRemaining: PropTypes.string,
gasChartProps: PropTypes.object,
insufficientBalance: PropTypes.bool,
@@ -40,19 +40,20 @@ export default class AdvancedTabContent extends Component {
}
gasInputError ({ labelKey, insufficientBalance, customPriceIsSafe, isSpeedUp, value }) {
+ const { t } = this.context
let errorText
let errorType
let isInError = true
if (insufficientBalance) {
- errorText = 'Insufficient Balance'
+ errorText = t('insufficientBalance')
errorType = 'error'
} else if (labelKey === 'gasPrice' && isSpeedUp && value === 0) {
- errorText = 'Zero gas price on speed up'
+ errorText = t('zeroGasPriceOnSpeedUpError')
errorType = 'error'
} else if (labelKey === 'gasPrice' && !customPriceIsSafe) {
- errorText = 'Gas Price Extremely Low'
+ errorText = t('gasPriceExtremelyLow')
errorType = 'warning'
} else {
isInError = false
@@ -103,7 +104,7 @@ export default class AdvancedTabContent extends Component {
return <i className="fa fa-info-circle" onClick={onClick} />
}
- renderDataSummary (totalFee, timeRemaining) {
+ renderDataSummary (transactionFee, timeRemaining) {
return (
<div className="advanced-tab__transaction-data-summary">
<div className="advanced-tab__transaction-data-summary__titles">
@@ -112,7 +113,7 @@ export default class AdvancedTabContent extends Component {
</div>
<div className="advanced-tab__transaction-data-summary__container">
<div className="advanced-tab__transaction-data-summary__fee">
- {totalFee}
+ {transactionFee}
</div>
<div className="time-remaining">{timeRemaining}</div>
</div>
@@ -164,6 +165,7 @@ export default class AdvancedTabContent extends Component {
}
render () {
+ const { t } = this.context
const {
updateCustomGasPrice,
updateCustomGasLimit,
@@ -171,16 +173,16 @@ export default class AdvancedTabContent extends Component {
customGasPrice,
customGasLimit,
insufficientBalance,
- totalFee,
gasChartProps,
gasEstimatesLoading,
customPriceIsSafe,
isSpeedUp,
+ transactionFee,
} = this.props
return (
<div className="advanced-tab">
- { this.renderDataSummary(totalFee, timeRemaining) }
+ { this.renderDataSummary(transactionFee, timeRemaining) }
<div className="advanced-tab__fee-chart">
{ this.renderGasEditRows({
customGasPrice,
@@ -191,14 +193,14 @@ export default class AdvancedTabContent extends Component {
customPriceIsSafe,
isSpeedUp,
}) }
- <div className="advanced-tab__fee-chart__title">Live Gas Price Predictions</div>
+ <div className="advanced-tab__fee-chart__title">{ t('liveGasPricePredictions') }</div>
{!gasEstimatesLoading
? <GasPriceChart {...gasChartProps} updateCustomGasPrice={updateCustomGasPrice} />
: <Loading />
}
<div className="advanced-tab__fee-chart__speed-buttons">
- <span>Slower</span>
- <span>Faster</span>
+ <span>{ t('slower') }</span>
+ <span>{ t('faster') }</span>
</div>
</div>
</div>