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:
parent
b2e4f913ba
commit
20aa135ad8
@ -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) {
|
||||
|
@ -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)
|
||||
})
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user