aboutsummaryrefslogtreecommitdiffstats
path: root/app/scripts/keyring-controller.js
diff options
context:
space:
mode:
authorDan Finlay <dan@danfinlay.com>2016-12-09 06:22:02 +0800
committerDan Finlay <dan@danfinlay.com>2016-12-09 06:22:02 +0800
commitab9e15b782620002c0a2477829db3e56a25a7d5c (patch)
treef35f27db6ecd1dc04649a4d9c13625580e4b98e5 /app/scripts/keyring-controller.js
parent9e3fa3cfba20299413df87d18158180c7798d2ac (diff)
downloadtangerine-wallet-browser-ab9e15b782620002c0a2477829db3e56a25a7d5c.tar
tangerine-wallet-browser-ab9e15b782620002c0a2477829db3e56a25a7d5c.tar.gz
tangerine-wallet-browser-ab9e15b782620002c0a2477829db3e56a25a7d5c.tar.bz2
tangerine-wallet-browser-ab9e15b782620002c0a2477829db3e56a25a7d5c.tar.lz
tangerine-wallet-browser-ab9e15b782620002c0a2477829db3e56a25a7d5c.tar.xz
tangerine-wallet-browser-ab9e15b782620002c0a2477829db3e56a25a7d5c.tar.zst
tangerine-wallet-browser-ab9e15b782620002c0a2477829db3e56a25a7d5c.zip
Mostly added bad account detection
Currently riddled with logs, because the migrator is inexplicably returning before generating the new style accounts for comparison.
Diffstat (limited to 'app/scripts/keyring-controller.js')
-rw-r--r--app/scripts/keyring-controller.js8
1 files changed, 7 insertions, 1 deletions
diff --git a/app/scripts/keyring-controller.js b/app/scripts/keyring-controller.js
index 40c9695dd..d0ce16cbb 100644
--- a/app/scripts/keyring-controller.js
+++ b/app/scripts/keyring-controller.js
@@ -113,6 +113,7 @@ module.exports = class KeyringController extends EventEmitter {
conversionDate: this.configManager.getConversionDate(),
keyringTypes: this.keyringTypes.map(krt => krt.type),
identities: this.identities,
+ lostAccounts: this.configManager.getLostAccounts(),
}
}
@@ -623,7 +624,12 @@ module.exports = class KeyringController extends EventEmitter {
migrateOldVaultIfAny (password) {
const shouldMigrate = !!this.configManager.getWallet() && !this.configManager.getVault()
return this.idStoreMigrator.migratedVaultForPassword(password)
- .then((serialized) => {
+ .then((result) => {
+ console.log('migrator called back with')
+ console.dir(result)
+ const { serialized, lostAccounts } = result
+ console.dir({ serialized, lostAccounts })
+ this.configManager.setLostAccounts(lostAccounts)
this.password = password
if (serialized && shouldMigrate) {