From 615b8d05a15dcbc572f64d3aa7b8e9feab367bdc Mon Sep 17 00:00:00 2001 From: Kevin Serrano Date: Mon, 26 Jun 2017 15:47:53 -0700 Subject: Prevent users from accidentally submitting two transactions by disabling button. --- ui/app/components/pending-tx.js | 3 +++ 1 file changed, 3 insertions(+) (limited to 'ui/app/components') diff --git a/ui/app/components/pending-tx.js b/ui/app/components/pending-tx.js index 4b1a00eca..5d6954092 100644 --- a/ui/app/components/pending-tx.js +++ b/ui/app/components/pending-tx.js @@ -410,6 +410,8 @@ PendingTx.prototype.resetGasFields = function () { PendingTx.prototype.onSubmit = function (event) { event.preventDefault() + const acceptButton = document.querySelector('input.confirm') + acceptButton.disabled = true const txMeta = this.gatherTxMeta() const valid = this.checkValidity() this.setState({ valid }) @@ -417,6 +419,7 @@ PendingTx.prototype.onSubmit = function (event) { this.props.sendTransaction(txMeta, event) } else { this.props.dispatch(actions.displayWarning('Invalid Gas Parameters')) + acceptButton.disabled = false } } -- cgit v1.2.3