aboutsummaryrefslogtreecommitdiffstats
path: root/ui/app/components/customize-gas-modal/index.js
diff options
context:
space:
mode:
authorkumavis <kumavis@users.noreply.github.com>2018-06-19 06:11:16 +0800
committerGitHub <noreply@github.com>2018-06-19 06:11:16 +0800
commit4598554fea7b9435e5cbecc4735c479ffbadf37e (patch)
tree338aaee17d433383c9a57b385489cbc8df3f82d0 /ui/app/components/customize-gas-modal/index.js
parent39a7702c8f0aa2c2e7fdf2bcf913e76bb8b827f4 (diff)
parent0e3ecbbc4f7ab0579a33bf315af4dfafeb43f339 (diff)
downloadtangerine-wallet-browser-4598554fea7b9435e5cbecc4735c479ffbadf37e.tar.gz
tangerine-wallet-browser-4598554fea7b9435e5cbecc4735c479ffbadf37e.tar.zst
tangerine-wallet-browser-4598554fea7b9435e5cbecc4735c479ffbadf37e.zip
Merge pull request #4603 from MetaMask/v4.8.0
V4.8.0
Diffstat (limited to 'ui/app/components/customize-gas-modal/index.js')
-rw-r--r--ui/app/components/customize-gas-modal/index.js28
1 files changed, 16 insertions, 12 deletions
diff --git a/ui/app/components/customize-gas-modal/index.js b/ui/app/components/customize-gas-modal/index.js
index e3529041b..c8522a3c7 100644
--- a/ui/app/components/customize-gas-modal/index.js
+++ b/ui/app/components/customize-gas-modal/index.js
@@ -8,15 +8,19 @@ const GasModalCard = require('./gas-modal-card')
const ethUtil = require('ethereumjs-util')
+import {
+ updateSendErrors,
+} from '../../ducks/send.duck'
+
const {
MIN_GAS_PRICE_DEC,
MIN_GAS_LIMIT_DEC,
MIN_GAS_PRICE_GWEI,
-} = require('../send/send-constants')
+} = require('../send_/send.constants')
const {
isBalanceSufficient,
-} = require('../send/send-utils')
+} = require('../send_/send.utils')
const {
conversionUtil,
@@ -61,11 +65,11 @@ function mapStateToProps (state) {
function mapDispatchToProps (dispatch) {
return {
hideModal: () => dispatch(actions.hideModal()),
- updateGasPrice: newGasPrice => dispatch(actions.updateGasPrice(newGasPrice)),
- updateGasLimit: newGasLimit => dispatch(actions.updateGasLimit(newGasLimit)),
- updateGasTotal: newGasTotal => dispatch(actions.updateGasTotal(newGasTotal)),
+ setGasPrice: newGasPrice => dispatch(actions.setGasPrice(newGasPrice)),
+ setGasLimit: newGasLimit => dispatch(actions.setGasLimit(newGasLimit)),
+ setGasTotal: newGasTotal => dispatch(actions.setGasTotal(newGasTotal)),
updateSendAmount: newAmount => dispatch(actions.updateSendAmount(newAmount)),
- updateSendErrors: error => dispatch(actions.updateSendErrors(error)),
+ updateSendErrors: error => dispatch(updateSendErrors(error)),
}
}
@@ -105,10 +109,10 @@ module.exports = connect(mapStateToProps, mapDispatchToProps)(CustomizeGasModal)
CustomizeGasModal.prototype.save = function (gasPrice, gasLimit, gasTotal) {
const {
- updateGasPrice,
- updateGasLimit,
+ setGasPrice,
+ setGasLimit,
hideModal,
- updateGasTotal,
+ setGasTotal,
maxModeOn,
selectedToken,
balance,
@@ -125,9 +129,9 @@ CustomizeGasModal.prototype.save = function (gasPrice, gasLimit, gasTotal) {
updateSendAmount(maxAmount)
}
- updateGasPrice(ethUtil.addHexPrefix(gasPrice))
- updateGasLimit(ethUtil.addHexPrefix(gasLimit))
- updateGasTotal(ethUtil.addHexPrefix(gasTotal))
+ setGasPrice(ethUtil.addHexPrefix(gasPrice))
+ setGasLimit(ethUtil.addHexPrefix(gasLimit))
+ setGasTotal(ethUtil.addHexPrefix(gasTotal))
updateSendErrors({ insufficientFunds: false })
hideModal()
}