aboutsummaryrefslogtreecommitdiffstats
path: root/ui/app/components
diff options
context:
space:
mode:
authorKevin Serrano <kevin.serrano@consensys.net>2017-06-27 06:47:53 +0800
committerKevin Serrano <kevin.serrano@consensys.net>2017-06-27 06:47:53 +0800
commit615b8d05a15dcbc572f64d3aa7b8e9feab367bdc (patch)
tree445c345181b507e6db7b54ccc7b6a1bc74d72e4e /ui/app/components
parent8b5b2d832995ca4b928c47abebd7e5476ac71e6a (diff)
downloadtangerine-wallet-browser-615b8d05a15dcbc572f64d3aa7b8e9feab367bdc.tar
tangerine-wallet-browser-615b8d05a15dcbc572f64d3aa7b8e9feab367bdc.tar.gz
tangerine-wallet-browser-615b8d05a15dcbc572f64d3aa7b8e9feab367bdc.tar.bz2
tangerine-wallet-browser-615b8d05a15dcbc572f64d3aa7b8e9feab367bdc.tar.lz
tangerine-wallet-browser-615b8d05a15dcbc572f64d3aa7b8e9feab367bdc.tar.xz
tangerine-wallet-browser-615b8d05a15dcbc572f64d3aa7b8e9feab367bdc.tar.zst
tangerine-wallet-browser-615b8d05a15dcbc572f64d3aa7b8e9feab367bdc.zip
Prevent users from accidentally submitting two transactions by disabling button.
Diffstat (limited to 'ui/app/components')
-rw-r--r--ui/app/components/pending-tx.js3
1 files changed, 3 insertions, 0 deletions
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
}
}