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 | |
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.
-rw-r--r-- | app/scripts/metamask-controller.js | 13 | ||||
-rw-r--r-- | ui/app/keychains/hd/restore-vault.js | 4 |
2 files changed, 13 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) { diff --git a/ui/app/keychains/hd/restore-vault.js b/ui/app/keychains/hd/restore-vault.js index 06e51d9b3..24b37a83d 100644 --- a/ui/app/keychains/hd/restore-vault.js +++ b/ui/app/keychains/hd/restore-vault.js @@ -149,4 +149,8 @@ RestoreVaultScreen.prototype.createNewVaultAndRestore = function () { this.warning = null this.props.dispatch(actions.displayWarning(this.warning)) this.props.dispatch(actions.createNewVaultAndRestore(password, seed)) + .catch((err) => { + log.error(err.message) + }) + } |