aboutsummaryrefslogtreecommitdiffstats
path: root/ui/app/components/customize-gas-modal/index.js
diff options
context:
space:
mode:
Diffstat (limited to 'ui/app/components/customize-gas-modal/index.js')
-rw-r--r--ui/app/components/customize-gas-modal/index.js19
1 files changed, 9 insertions, 10 deletions
diff --git a/ui/app/components/customize-gas-modal/index.js b/ui/app/components/customize-gas-modal/index.js
index 80ea98cc8..101a19d9f 100644
--- a/ui/app/components/customize-gas-modal/index.js
+++ b/ui/app/components/customize-gas-modal/index.js
@@ -2,7 +2,6 @@ const Component = require('react').Component
const h = require('react-hyperscript')
const inherits = require('util').inherits
const connect = require('react-redux').connect
-const ethUtil = require('ethereumjs-util')
const actions = require('../../actions')
const GasModalCard = require('./gas-modal-card')
@@ -59,7 +58,7 @@ function mapDispatchToProps (dispatch) {
}
}
-function getOriginalState(props) {
+function getOriginalState (props) {
const gasPrice = props.gasPrice || MIN_GAS_PRICE_DEC
const gasLimit = props.gasLimit || MIN_GAS_LIMIT_DEC
@@ -91,7 +90,7 @@ CustomizeGasModal.prototype.save = function (gasPrice, gasLimit, gasTotal) {
updateGasPrice,
updateGasLimit,
hideModal,
- updateGasTotal
+ updateGasTotal,
} = this.props
updateGasPrice(gasPrice)
@@ -127,9 +126,9 @@ CustomizeGasModal.prototype.validate = function ({ gasTotal, gasLimit }) {
})
if (!balanceIsSufficient) {
- error = 'Insufficient balance for current gas total'
+ error = 'Insufficient balance for current gas total'
}
-
+
const gasLimitTooLow = gasLimit && conversionGreaterThan(
{
value: MIN_GAS_LIMIT_DEC,
@@ -143,7 +142,7 @@ CustomizeGasModal.prototype.validate = function ({ gasTotal, gasLimit }) {
)
if (gasLimitTooLow) {
- error = 'Gas limit must be at least 21000'
+ error = 'Gas limit must be at least 21000'
}
this.setState({ error })
@@ -191,7 +190,7 @@ CustomizeGasModal.prototype.convertAndSetGasPrice = function (newGasPrice) {
}
CustomizeGasModal.prototype.render = function () {
- const { hideModal, conversionRate } = this.props
+ const { hideModal } = this.props
const { gasPrice, gasLimit, gasTotal, error } = this.state
const convertedGasPrice = conversionUtil(gasPrice, {
@@ -220,7 +219,7 @@ CustomizeGasModal.prototype.render = function () {
]),
h('div.send-v2__customize-gas__body', {}, [
-
+
h(GasModalCard, {
value: convertedGasPrice,
min: MIN_GAS_PRICE_GWEI,
@@ -248,7 +247,7 @@ CustomizeGasModal.prototype.render = function () {
error && h('div.send-v2__customize-gas__error-message', [
error,
]),
-
+
h('div.send-v2__customize-gas__revert', {
onClick: () => this.revert(),
}, ['Revert']),
@@ -261,7 +260,7 @@ CustomizeGasModal.prototype.render = function () {
h(`div.send-v2__customize-gas__save${error ? '__error' : ''}`, {
onClick: () => !error && this.save(gasPrice, gasLimit, gasTotal),
}, ['SAVE']),
- ])
+ ]),
]),