aboutsummaryrefslogtreecommitdiffstats
path: root/app
diff options
context:
space:
mode:
authorKevin Serrano <kevin.serrano@consensys.net>2018-01-04 08:06:46 +0800
committerKevin Serrano <kevin.serrano@consensys.net>2018-01-04 08:06:46 +0800
commit20aa135ad87231694ead2fe65a3124b719b8fc4d (patch)
tree9d163ea803042484cce9f6fe57189280e39dfc0b /app
parentb2e4f913bae41b62df7d4893ab10c426d3f72aca (diff)
downloadtangerine-wallet-browser-20aa135ad87231694ead2fe65a3124b719b8fc4d.tar
tangerine-wallet-browser-20aa135ad87231694ead2fe65a3124b719b8fc4d.tar.gz
tangerine-wallet-browser-20aa135ad87231694ead2fe65a3124b719b8fc4d.tar.bz2
tangerine-wallet-browser-20aa135ad87231694ead2fe65a3124b719b8fc4d.tar.lz
tangerine-wallet-browser-20aa135ad87231694ead2fe65a3124b719b8fc4d.tar.xz
tangerine-wallet-browser-20aa135ad87231694ead2fe65a3124b719b8fc4d.tar.zst
tangerine-wallet-browser-20aa135ad87231694ead2fe65a3124b719b8fc4d.zip
Add fix for infinite spinner for incorrect seed phrase.
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 23f2a1598..8d8c1d094 100644
--- a/app/scripts/metamask-controller.js
+++ b/app/scripts/metamask-controller.js
@@ -513,10 +513,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) {