mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-23 09:52:26 +01:00
Confirm send token detects if balance is sufficient for gas.
This commit is contained in:
parent
b324a9c295
commit
d6ebf5d94e
@ -64,6 +64,7 @@ function mapDispatchToProps (dispatch) {
|
|||||||
updateGasLimit: newGasLimit => dispatch(actions.updateGasLimit(newGasLimit)),
|
updateGasLimit: newGasLimit => dispatch(actions.updateGasLimit(newGasLimit)),
|
||||||
updateGasTotal: newGasTotal => dispatch(actions.updateGasTotal(newGasTotal)),
|
updateGasTotal: newGasTotal => dispatch(actions.updateGasTotal(newGasTotal)),
|
||||||
updateSendAmount: newAmount => dispatch(actions.updateSendAmount(newAmount)),
|
updateSendAmount: newAmount => dispatch(actions.updateSendAmount(newAmount)),
|
||||||
|
updateSendErrors: error => dispatch(actions.updateSendErrors(error)),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -106,6 +107,7 @@ CustomizeGasModal.prototype.save = function (gasPrice, gasLimit, gasTotal) {
|
|||||||
selectedToken,
|
selectedToken,
|
||||||
balance,
|
balance,
|
||||||
updateSendAmount,
|
updateSendAmount,
|
||||||
|
updateSendErrors,
|
||||||
} = this.props
|
} = this.props
|
||||||
|
|
||||||
if (maxModeOn && !selectedToken) {
|
if (maxModeOn && !selectedToken) {
|
||||||
@ -120,6 +122,7 @@ CustomizeGasModal.prototype.save = function (gasPrice, gasLimit, gasTotal) {
|
|||||||
updateGasPrice(ethUtil.addHexPrefix(gasPrice))
|
updateGasPrice(ethUtil.addHexPrefix(gasPrice))
|
||||||
updateGasLimit(ethUtil.addHexPrefix(gasLimit))
|
updateGasLimit(ethUtil.addHexPrefix(gasLimit))
|
||||||
updateGasTotal(ethUtil.addHexPrefix(gasTotal))
|
updateGasTotal(ethUtil.addHexPrefix(gasTotal))
|
||||||
|
updateSendErrors({ insufficientFunds: false })
|
||||||
hideModal()
|
hideModal()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user