diff options
author | Kevin Serrano <kevin.serrano@consensys.net> | 2018-01-04 08:06:46 +0800 |
---|---|---|
committer | Kevin Serrano <kevin.serrano@consensys.net> | 2018-01-04 08:06:46 +0800 |
commit | 20aa135ad87231694ead2fe65a3124b719b8fc4d (patch) | |
tree | 9d163ea803042484cce9f6fe57189280e39dfc0b /app/scripts/metamask-controller.js | |
parent | b2e4f913bae41b62df7d4893ab10c426d3f72aca (diff) | |
download | tangerine-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/scripts/metamask-controller.js')
-rw-r--r-- | app/scripts/metamask-controller.js | 13 |
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) { |