1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-12-22 17:33:23 +01:00

Add fix for infinite spinner for incorrect seed phrase.

This commit is contained in:
Kevin Serrano 2018-01-03 16:06:46 -08:00
parent b2e4f913ba
commit 20aa135ad8
No known key found for this signature in database
GPG Key ID: BF999DEFC7371BA1
2 changed files with 13 additions and 4 deletions

View File

@ -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) {

View File

@ -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)
})
}