diff options
author | frankiebee <frankie.diamond@gmail.com> | 2017-11-08 01:29:47 +0800 |
---|---|---|
committer | frankiebee <frankie.diamond@gmail.com> | 2017-11-08 01:29:47 +0800 |
commit | 08867874ccea02dab9755ba6b0fc4221bb1dbf00 (patch) | |
tree | 5b2b893c4c00a14daa9724ba28ff7dc8f504ea10 /ui/app/components/customize-gas-modal/index.js | |
parent | a89b682dec350218b2d753d6cfb196f965acdde2 (diff) | |
parent | acc973d543ac65f8db980c0007c248c509345411 (diff) | |
download | tangerine-wallet-browser-08867874ccea02dab9755ba6b0fc4221bb1dbf00.tar tangerine-wallet-browser-08867874ccea02dab9755ba6b0fc4221bb1dbf00.tar.gz tangerine-wallet-browser-08867874ccea02dab9755ba6b0fc4221bb1dbf00.tar.bz2 tangerine-wallet-browser-08867874ccea02dab9755ba6b0fc4221bb1dbf00.tar.lz tangerine-wallet-browser-08867874ccea02dab9755ba6b0fc4221bb1dbf00.tar.xz tangerine-wallet-browser-08867874ccea02dab9755ba6b0fc4221bb1dbf00.tar.zst tangerine-wallet-browser-08867874ccea02dab9755ba6b0fc4221bb1dbf00.zip |
Merge remote-tracking branch 'origin/uat' into mascara-first-screen
Diffstat (limited to 'ui/app/components/customize-gas-modal/index.js')
-rw-r--r-- | ui/app/components/customize-gas-modal/index.js | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/ui/app/components/customize-gas-modal/index.js b/ui/app/components/customize-gas-modal/index.js index 722ed2b23..101a19d9f 100644 --- a/ui/app/components/customize-gas-modal/index.js +++ b/ui/app/components/customize-gas-modal/index.js @@ -58,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 @@ -90,7 +90,7 @@ CustomizeGasModal.prototype.save = function (gasPrice, gasLimit, gasTotal) { updateGasPrice, updateGasLimit, hideModal, - updateGasTotal + updateGasTotal, } = this.props updateGasPrice(gasPrice) @@ -126,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, @@ -142,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 }) @@ -190,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, { @@ -219,12 +219,12 @@ CustomizeGasModal.prototype.render = function () { ]), h('div.send-v2__customize-gas__body', {}, [ - + h(GasModalCard, { value: convertedGasPrice, min: MIN_GAS_PRICE_GWEI, // max: 1000, - step: 1, + step: MIN_GAS_PRICE_GWEI, onChange: value => this.convertAndSetGasPrice(value), title: 'Gas Price (GWEI)', copy: 'We calculate the suggested gas prices based on network success rates.', @@ -247,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']), @@ -260,7 +260,7 @@ CustomizeGasModal.prototype.render = function () { h(`div.send-v2__customize-gas__save${error ? '__error' : ''}`, { onClick: () => !error && this.save(gasPrice, gasLimit, gasTotal), }, ['SAVE']), - ]) + ]), ]), |