diff --git a/app/scripts/metamask-controller.js b/app/scripts/metamask-controller.js index c48a4c569..38c8b21af 100644 --- a/app/scripts/metamask-controller.js +++ b/app/scripts/metamask-controller.js @@ -379,7 +379,12 @@ module.exports = class MetamaskController { this.configManager.createShapeShiftTx(depositAddress, depositType) } - setGasMultiplier (gasMultiplier) { - this.configManager.setGasMultiplier(gasMultiplier) + setGasMultiplier (gasMultiplier, cb) { + try{ + this.configManager.setGasMultiplier(gasMultiplier) + cb() + } catch (e) { + cb(e) + } } } diff --git a/ui/app/actions.js b/ui/app/actions.js index 9cacadc0d..1f0d8fc78 100644 --- a/ui/app/actions.js +++ b/ui/app/actions.js @@ -277,15 +277,17 @@ function signMsg (msgData) { } function signTx (txData) { - _accountManager.setGasMultiplier(txData.gasMultiplier) return (dispatch) => { - web3.eth.sendTransaction(txData, (err, data) => { - dispatch(actions.hideLoadingIndication()) + _accountManager.setGasMultiplier(txData.gasMultiplier, (err) => { if (err) return dispatch(actions.displayWarning(err.message)) - dispatch(actions.hideWarning()) - dispatch(actions.goHome()) + web3.eth.sendTransaction(txData, (err, data) => { + dispatch(actions.hideLoadingIndication()) + if (err) return dispatch(actions.displayWarning(err.message)) + dispatch(actions.hideWarning()) + dispatch(actions.goHome()) + }) + dispatch(this.showConfTxPage()) }) - dispatch(this.showConfTxPage()) } } diff --git a/ui/app/components/range-slider.js b/ui/app/components/range-slider.js index cc1de1ce5..823f5eb01 100644 --- a/ui/app/components/range-slider.js +++ b/ui/app/components/range-slider.js @@ -35,7 +35,7 @@ RangeSlider.prototype.render = function () { step: increment, style: range, value: state.value || defaultValue, - onChange: mirrorInput ? this.mirrorInputs.bind(this, name) : onInput, + onChange: mirrorInput ? this.mirrorInputs.bind(this, event) : onInput, }), // Mirrored input for range @@ -47,12 +47,12 @@ RangeSlider.prototype.render = function () { value: state.value || defaultValue, step: increment, style: input, - onChange: this.mirrorInputs.bind(this, `${name}Mirror`), + onChange: this.mirrorInputs.bind(this, event), }) : null, ]) ) } -RangeSlider.prototype.mirrorInputs = function (active, event) { +RangeSlider.prototype.mirrorInputs = function (event) { this.setState({value: event.target.value}) } diff --git a/ui/app/send.js b/ui/app/send.js index 323ddb5e3..97ed29e4a 100644 --- a/ui/app/send.js +++ b/ui/app/send.js @@ -207,7 +207,7 @@ SendTransactionScreen.prototype.render = function () { }, }), ]), - // custom gas field + // custom gasPrice field h('h3.flex-center.text-transform-uppercase', { style: { background: '#EBEBEB',