|
|
@ -27,6 +27,7 @@ function PendingTx () { |
|
|
|
this.state = { |
|
|
|
this.state = { |
|
|
|
valid: true, |
|
|
|
valid: true, |
|
|
|
txData: null, |
|
|
|
txData: null, |
|
|
|
|
|
|
|
submitting: false, |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -316,7 +317,7 @@ PendingTx.prototype.render = function () { |
|
|
|
type: 'submit', |
|
|
|
type: 'submit', |
|
|
|
value: 'ACCEPT', |
|
|
|
value: 'ACCEPT', |
|
|
|
style: { marginLeft: '10px' }, |
|
|
|
style: { marginLeft: '10px' }, |
|
|
|
disabled: insufficientBalance || !this.state.valid || !isValidAddress, |
|
|
|
disabled: insufficientBalance || !this.state.valid || !isValidAddress || this.state.submitting, |
|
|
|
}), |
|
|
|
}), |
|
|
|
|
|
|
|
|
|
|
|
h('button.cancel.btn-red', { |
|
|
|
h('button.cancel.btn-red', { |
|
|
@ -412,11 +413,12 @@ PendingTx.prototype.onSubmit = function (event) { |
|
|
|
event.preventDefault() |
|
|
|
event.preventDefault() |
|
|
|
const txMeta = this.gatherTxMeta() |
|
|
|
const txMeta = this.gatherTxMeta() |
|
|
|
const valid = this.checkValidity() |
|
|
|
const valid = this.checkValidity() |
|
|
|
this.setState({ valid }) |
|
|
|
this.setState({ valid, submitting: true }) |
|
|
|
if (valid && this.verifyGasParams()) { |
|
|
|
if (valid && this.verifyGasParams()) { |
|
|
|
this.props.sendTransaction(txMeta, event) |
|
|
|
this.props.sendTransaction(txMeta, event) |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
this.props.dispatch(actions.displayWarning('Invalid Gas Parameters')) |
|
|
|
this.props.dispatch(actions.displayWarning('Invalid Gas Parameters')) |
|
|
|
|
|
|
|
this.setState({ submitting: false }) |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|