aboutsummaryrefslogtreecommitdiffstats
path: root/app
diff options
context:
space:
mode:
authorKevin Serrano <kevgagser@gmail.com>2018-01-09 03:43:43 +0800
committerGitHub <noreply@github.com>2018-01-09 03:43:43 +0800
commit0cf5c22178050fff0e89af2a12d87ef7fdf4440c (patch)
tree0c512e96e6ee56dea366cbef63ace5204d90bc3c /app
parentf6f3f915707a2a4f5c9db43ae51741c7d30cbc69 (diff)
parent52bb711fa99611678d2a2e9b4098f9a6ece8adda (diff)
downloadtangerine-wallet-browser-0cf5c22178050fff0e89af2a12d87ef7fdf4440c.tar
tangerine-wallet-browser-0cf5c22178050fff0e89af2a12d87ef7fdf4440c.tar.gz
tangerine-wallet-browser-0cf5c22178050fff0e89af2a12d87ef7fdf4440c.tar.bz2
tangerine-wallet-browser-0cf5c22178050fff0e89af2a12d87ef7fdf4440c.tar.lz
tangerine-wallet-browser-0cf5c22178050fff0e89af2a12d87ef7fdf4440c.tar.xz
tangerine-wallet-browser-0cf5c22178050fff0e89af2a12d87ef7fdf4440c.tar.zst
tangerine-wallet-browser-0cf5c22178050fff0e89af2a12d87ef7fdf4440c.zip
Merge pull request #2851 from MetaMask/i2812-seedworderrorfix
Fix condition where failing seed word checks would infinite-spin future attempts.
Diffstat (limited to 'app')
-rw-r--r--app/scripts/metamask-controller.js13
1 files changed, 9 insertions, 4 deletions
diff --git a/app/scripts/metamask-controller.js b/app/scripts/metamask-controller.js
index 1b13f6567..66738db51 100644
--- a/app/scripts/metamask-controller.js
+++ b/app/scripts/metamask-controller.js
@@ -536,10 +536,15 @@ module.exports = class MetamaskController extends EventEmitter {
async createNewVaultAndRestore (password, seed) {
const release = await this.createVaultMutex.acquire()
- const vault = await this.keyringController.createNewVaultAndRestore(password, seed)
- this.selectFirstIdentity(vault)
- release()
- return vault
+ try {
+ const vault = await this.keyringController.createNewVaultAndRestore(password, seed)
+ this.selectFirstIdentity(vault)
+ release()
+ return vault
+ } catch (err) {
+ release()
+ throw err
+ }
}
selectFirstIdentity (vault) {