Add fix for infinite spinner for incorrect seed phrase.

feature/default_network_editable
Kevin Serrano 7 years ago
parent b2e4f913ba
commit 20aa135ad8
No known key found for this signature in database
GPG Key ID: BF999DEFC7371BA1
  1. 5
      app/scripts/metamask-controller.js
  2. 4
      ui/app/keychains/hd/restore-vault.js

@ -513,10 +513,15 @@ module.exports = class MetamaskController extends EventEmitter {
async createNewVaultAndRestore (password, seed) {
const release = await this.createVaultMutex.acquire()
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…
Cancel
Save