mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-23 01:39:44 +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) {
|
unlockKeyrings (password) {
|
||||||
const encryptedVault = this.configManager.getVault()
|
const encryptedVault = this.configManager.getVault()
|
||||||
return this.encryptor.decrypt(this.password, encryptedVault)
|
return this.encryptor.decrypt(password, encryptedVault)
|
||||||
.then((vault) => {
|
.then((vault) => {
|
||||||
|
this.password = password
|
||||||
vault.forEach(this.restoreKeyring.bind(this))
|
vault.forEach(this.restoreKeyring.bind(this))
|
||||||
return this.keyrings
|
return this.keyrings
|
||||||
})
|
})
|
||||||
|
@ -87,6 +87,7 @@ describe('KeyringController', function() {
|
|||||||
keyringController.migrateOldVaultIfAny(password)
|
keyringController.migrateOldVaultIfAny(password)
|
||||||
.then(() => {
|
.then(() => {
|
||||||
assert(keyringController.configManager.getVault(), 'now has a vault')
|
assert(keyringController.configManager.getVault(), 'now has a vault')
|
||||||
|
assert(keyringController.password, 'has a password set')
|
||||||
done()
|
done()
|
||||||
})
|
})
|
||||||
.catch((reason) => {
|
.catch((reason) => {
|
||||||
|
Loading…
Reference in New Issue
Block a user