1
0
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:
Dan Finlay 2016-11-22 16:29:46 -08:00
parent 6ebdebc0a5
commit 822face7a3
2 changed files with 3 additions and 1 deletions

View File

@ -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
})

View File

@ -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) => {