Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
rekmarks committed Mar 18, 2020
1 parent 9398ab4 commit 6bc95aa
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions app/scripts/metamask-controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -614,11 +614,11 @@ export default class MetamaskController extends EventEmitter {
this.preferencesController.setAddresses(accounts)
this.selectFirstIdentity()
}
releaseLock()
return vault
} catch (err) {
releaseLock()
throw err
} finally {
releaseLock()
}
}

Expand Down Expand Up @@ -658,11 +658,11 @@ export default class MetamaskController extends EventEmitter {
// set new identities
this.preferencesController.setAddresses(accounts)
this.selectFirstIdentity()
releaseLock()
return vault
} catch (err) {
releaseLock()
throw err
} finally {
releaseLock()
}
}

Expand Down Expand Up @@ -774,7 +774,6 @@ export default class MetamaskController extends EventEmitter {
*/
async submitPassword (password) {
await this.keyringController.submitPassword(password)
this.emit('unlocked')

const accounts = await this.keyringController.getAccounts()

Expand Down

0 comments on commit 6bc95aa

Please sign in to comment.