mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-11-26 20:39:08 +01:00
Persist keyrings from migration to storage.
This commit is contained in:
parent
bef023fb4a
commit
cd2442e3e7
@ -117,7 +117,6 @@ module.exports = class KeyringController extends EventEmitter {
|
||||
migrateAndGetKey (password) {
|
||||
let key
|
||||
const shouldMigrate = !!this.configManager.getWallet() && !this.configManager.getVault()
|
||||
|
||||
return this.loadKey(password)
|
||||
.then((derivedKey) => {
|
||||
key = derivedKey
|
||||
@ -128,6 +127,7 @@ module.exports = class KeyringController extends EventEmitter {
|
||||
if (serialized && shouldMigrate) {
|
||||
const keyring = this.restoreKeyring(serialized)
|
||||
this.keyrings.push(keyring)
|
||||
this.persistAllKeyrings()
|
||||
this.configManager.setSelectedAccount(keyring.getAccounts()[0])
|
||||
}
|
||||
return key
|
||||
|
Loading…
Reference in New Issue
Block a user