aboutsummaryrefslogtreecommitdiffstats
path: root/app/scripts
diff options
context:
space:
mode:
authorDan Finlay <dan@danfinlay.com>2016-11-03 07:35:46 +0800
committerDan Finlay <dan@danfinlay.com>2016-11-03 07:35:46 +0800
commit185396ff08786dc108cabb57d47925032a9e2d74 (patch)
treee5ff35a7a75835b33519be905efc7934ea824a22 /app/scripts
parented1917d71a464c5cf12d3dc283fcc30976134db8 (diff)
downloadtangerine-wallet-browser-185396ff08786dc108cabb57d47925032a9e2d74.tar
tangerine-wallet-browser-185396ff08786dc108cabb57d47925032a9e2d74.tar.gz
tangerine-wallet-browser-185396ff08786dc108cabb57d47925032a9e2d74.tar.bz2
tangerine-wallet-browser-185396ff08786dc108cabb57d47925032a9e2d74.tar.lz
tangerine-wallet-browser-185396ff08786dc108cabb57d47925032a9e2d74.tar.xz
tangerine-wallet-browser-185396ff08786dc108cabb57d47925032a9e2d74.tar.zst
tangerine-wallet-browser-185396ff08786dc108cabb57d47925032a9e2d74.zip
Fix dual vault creation bug
Diffstat (limited to 'app/scripts')
-rw-r--r--app/scripts/keyring-controller.js15
1 files changed, 4 insertions, 11 deletions
diff --git a/app/scripts/keyring-controller.js b/app/scripts/keyring-controller.js
index f0fb0ad65..3b59c7890 100644
--- a/app/scripts/keyring-controller.js
+++ b/app/scripts/keyring-controller.js
@@ -131,12 +131,10 @@ module.exports = class KeyringController extends EventEmitter {
const keyring = this.restoreKeyring(accountLength, serialized)
this.keyrings.push(keyring)
this.configManager.setSelectedAccount(keyring.getAccounts()[0])
- return this.persistAllKeyrings().then(() => {
- return key
- })
- } else {
- return Promise.resolve(key)
}
+ return this.persistAllKeyrings().then(() => {
+ return key
+ })
})
}
@@ -147,12 +145,7 @@ module.exports = class KeyringController extends EventEmitter {
return this.migrateAndGetKey(password)
.then((key) => {
- return new Promise((res, rej) => {
- this.createFirstKeyTree(password, (err, state) => {
- if (err) return rej(err)
- res(configManager.getVault())
- })
- })
+ cb(null, configManager.getVault())
})
.then((encryptedString) => {
const serialized = this.keyrings[0].serialize()