aboutsummaryrefslogtreecommitdiffstats
path: root/app/scripts/lib
diff options
context:
space:
mode:
Diffstat (limited to 'app/scripts/lib')
-rw-r--r--app/scripts/lib/idStore-migrator.js15
1 files changed, 12 insertions, 3 deletions
diff --git a/app/scripts/lib/idStore-migrator.js b/app/scripts/lib/idStore-migrator.js
index c81e7ddfe..2d1826641 100644
--- a/app/scripts/lib/idStore-migrator.js
+++ b/app/scripts/lib/idStore-migrator.js
@@ -5,12 +5,21 @@ module.exports = class IdentityStoreMigrator {
constructor ({ configManager }) {
this.configManager = configManager
- this.idStore = new IdentityStore({ configManager })
+ const hasOldVault = this.hasOldVault()
+ if (!hasOldVault) {
+ this.idStore = new IdentityStore({ configManager })
+ }
}
oldSeedForPassword( password ) {
- const isOldVault = this.hasOldVault()
- if (!isOldVault) {
+ const hasOldVault = this.hasOldVault()
+ const configManager = this.configManager
+
+ if (!this.idStore) {
+ this.idStore = new IdentityStore({ configManager })
+ }
+
+ if (!hasOldVault) {
return Promise.resolve(null)
}