mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-11-22 18:00:18 +01:00
Fix bug where submit was enabled when invalid params were filled out.
This commit is contained in:
parent
2d739647b9
commit
10ca3b6467
@ -4,6 +4,7 @@
|
|||||||
|
|
||||||
- Now when switching networks the extension does not restart
|
- Now when switching networks the extension does not restart
|
||||||
- Cleanup decimal bugs in our gas inputs.
|
- Cleanup decimal bugs in our gas inputs.
|
||||||
|
- Fix bug where submit button was enabled for invalid gas inputs.
|
||||||
|
|
||||||
## 3.7.0 2017-5-23
|
## 3.7.0 2017-5-23
|
||||||
|
|
||||||
|
@ -67,7 +67,7 @@ BnAsDecimalInput.prototype.render = function () {
|
|||||||
|
|
||||||
const scaledNumber = this.upsize(value, scale, precision)
|
const scaledNumber = this.upsize(value, scale, precision)
|
||||||
const precisionBN = new BN(scaledNumber, 10)
|
const precisionBN = new BN(scaledNumber, 10)
|
||||||
onChange(precisionBN)
|
onChange(precisionBN, event.target.checkValidity())
|
||||||
},
|
},
|
||||||
onInvalid: (event) => {
|
onInvalid: (event) => {
|
||||||
const msg = this.constructWarning()
|
const msg = this.constructWarning()
|
||||||
|
@ -346,18 +346,24 @@ PendingTx.prototype.miniAccountPanelForRecipient = function () {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
PendingTx.prototype.gasPriceChanged = function (newBN) {
|
PendingTx.prototype.gasPriceChanged = function (newBN, valid) {
|
||||||
log.info(`Gas price changed to: ${newBN.toString(10)}`)
|
log.info(`Gas price changed to: ${newBN.toString(10)}`)
|
||||||
const txMeta = this.gatherTxMeta()
|
const txMeta = this.gatherTxMeta()
|
||||||
txMeta.txParams.gasPrice = '0x' + newBN.toString('hex')
|
txMeta.txParams.gasPrice = '0x' + newBN.toString('hex')
|
||||||
this.setState({ txData: clone(txMeta) })
|
this.setState({
|
||||||
|
txData: clone(txMeta),
|
||||||
|
valid,
|
||||||
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
PendingTx.prototype.gasLimitChanged = function (newBN) {
|
PendingTx.prototype.gasLimitChanged = function (newBN, valid) {
|
||||||
log.info(`Gas limit changed to ${newBN.toString(10)}`)
|
log.info(`Gas limit changed to ${newBN.toString(10)}`)
|
||||||
const txMeta = this.gatherTxMeta()
|
const txMeta = this.gatherTxMeta()
|
||||||
txMeta.txParams.gas = '0x' + newBN.toString('hex')
|
txMeta.txParams.gas = '0x' + newBN.toString('hex')
|
||||||
this.setState({ txData: clone(txMeta) })
|
this.setState({
|
||||||
|
txData: clone(txMeta),
|
||||||
|
valid,
|
||||||
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
PendingTx.prototype.resetGasFields = function () {
|
PendingTx.prototype.resetGasFields = function () {
|
||||||
|
Loading…
Reference in New Issue
Block a user