mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-22 09:23:21 +01:00
Fix password reference
This commit is contained in:
parent
6ebdebc0a5
commit
822face7a3
@ -274,8 +274,9 @@ module.exports = class KeyringController extends EventEmitter {
|
||||
|
||||
unlockKeyrings (password) {
|
||||
const encryptedVault = this.configManager.getVault()
|
||||
return this.encryptor.decrypt(this.password, encryptedVault)
|
||||
return this.encryptor.decrypt(password, encryptedVault)
|
||||
.then((vault) => {
|
||||
this.password = password
|
||||
vault.forEach(this.restoreKeyring.bind(this))
|
||||
return this.keyrings
|
||||
})
|
||||
|
@ -87,6 +87,7 @@ describe('KeyringController', function() {
|
||||
keyringController.migrateOldVaultIfAny(password)
|
||||
.then(() => {
|
||||
assert(keyringController.configManager.getVault(), 'now has a vault')
|
||||
assert(keyringController.password, 'has a password set')
|
||||
done()
|
||||
})
|
||||
.catch((reason) => {
|
||||
|
Loading…
Reference in New Issue
Block a user