aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDan Finlay <dan@danfinlay.com>2017-11-21 06:03:47 +0800
committerDan Finlay <dan@danfinlay.com>2017-11-21 06:03:47 +0800
commit597af980dd68c0252625e7cc5b6a6a223406fbc2 (patch)
tree6e641ea36b573ee9265084b08f664918b35b2739
parent65cb9704872fe7730285f4185ea6bc1a2d28c149 (diff)
downloadtangerine-wallet-browser-597af980dd68c0252625e7cc5b6a6a223406fbc2.tar
tangerine-wallet-browser-597af980dd68c0252625e7cc5b6a6a223406fbc2.tar.gz
tangerine-wallet-browser-597af980dd68c0252625e7cc5b6a6a223406fbc2.tar.bz2
tangerine-wallet-browser-597af980dd68c0252625e7cc5b6a6a223406fbc2.tar.lz
tangerine-wallet-browser-597af980dd68c0252625e7cc5b6a6a223406fbc2.tar.xz
tangerine-wallet-browser-597af980dd68c0252625e7cc5b6a6a223406fbc2.tar.zst
tangerine-wallet-browser-597af980dd68c0252625e7cc5b6a6a223406fbc2.zip
Prevent multiple submissions of first time form
-rw-r--r--ui/app/first-time/init-menu.js7
1 files changed, 6 insertions, 1 deletions
diff --git a/ui/app/first-time/init-menu.js b/ui/app/first-time/init-menu.js
index cc7c51bd3..b4587f1ee 100644
--- a/ui/app/first-time/init-menu.js
+++ b/ui/app/first-time/init-menu.js
@@ -8,6 +8,8 @@ const actions = require('../actions')
const Tooltip = require('../components/tooltip')
const getCaretCoordinates = require('textarea-caret')
+let isSubmitting = false
+
module.exports = connect(mapStateToProps)(InitializeMenuScreen)
inherits(InitializeMenuScreen, Component)
@@ -164,7 +166,10 @@ InitializeMenuScreen.prototype.createNewVaultAndKeychain = function () {
return
}
- this.props.dispatch(actions.createNewVaultAndKeychain(password))
+ if (!isSubmitting) {
+ isSubmitting = true
+ this.props.dispatch(actions.createNewVaultAndKeychain(password))
+ }
}
InitializeMenuScreen.prototype.inputChanged = function (event) {