diff options
-rw-r--r-- | app/scripts/keyring-controller.js | 3 | ||||
-rw-r--r-- | test/unit/keyring-controller-test.js | 1 |
2 files changed, 3 insertions, 1 deletions
diff --git a/app/scripts/keyring-controller.js b/app/scripts/keyring-controller.js index 4fa2b4ee8..141a1281a 100644 --- a/app/scripts/keyring-controller.js +++ b/app/scripts/keyring-controller.js @@ -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 }) diff --git a/test/unit/keyring-controller-test.js b/test/unit/keyring-controller-test.js index a58043c7a..b20def02e 100644 --- a/test/unit/keyring-controller-test.js +++ b/test/unit/keyring-controller-test.js @@ -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) => { |