aboutsummaryrefslogtreecommitdiffstats
path: root/app
diff options
context:
space:
mode:
authorDan Finlay <dan@danfinlay.com>2016-09-11 06:45:34 +0800
committerDan Finlay <dan@danfinlay.com>2016-09-11 06:45:34 +0800
commit9b861b6687d5b079560a67b35e4a4890da643b03 (patch)
tree3748d15d568a0352a598e2dbb27d834f80583530 /app
parent5e60b2f0c4c1a88839a87cc93d867c9c40d1090d (diff)
downloadtangerine-wallet-browser-9b861b6687d5b079560a67b35e4a4890da643b03.tar
tangerine-wallet-browser-9b861b6687d5b079560a67b35e4a4890da643b03.tar.gz
tangerine-wallet-browser-9b861b6687d5b079560a67b35e4a4890da643b03.tar.bz2
tangerine-wallet-browser-9b861b6687d5b079560a67b35e4a4890da643b03.tar.lz
tangerine-wallet-browser-9b861b6687d5b079560a67b35e4a4890da643b03.tar.xz
tangerine-wallet-browser-9b861b6687d5b079560a67b35e4a4890da643b03.tar.zst
tangerine-wallet-browser-9b861b6687d5b079560a67b35e4a4890da643b03.zip
Fixed caching bug
Fixed bug where the second new vault created in an IdStore would initially return the accounts from the original store. Also fixed some tests that were incorrect.
Diffstat (limited to 'app')
-rw-r--r--app/scripts/lib/idStore.js7
1 files changed, 1 insertions, 6 deletions
diff --git a/app/scripts/lib/idStore.js b/app/scripts/lib/idStore.js
index 69ffd3f72..afb91a335 100644
--- a/app/scripts/lib/idStore.js
+++ b/app/scripts/lib/idStore.js
@@ -75,7 +75,6 @@ IdentityStore.prototype.recoverFromSeed = function (password, seed, cb) {
if (err) return cb(err)
this._loadIdentities()
- this._didUpdate()
cb(null, this.getState())
})
}
@@ -394,7 +393,6 @@ IdentityStore.prototype._loadIdentities = function () {
var addresses = this._getAddresses()
addresses.forEach((address, i) => {
// // add to ethStore
- this._ethStore.addAccount(address)
// add to identities
const defaultLabel = 'Wallet ' + (i + 1)
const nickname = configManager.nicknameForWallet(address)
@@ -413,7 +411,6 @@ IdentityStore.prototype.saveAccountLabel = function (account, label, cb) {
configManager.setNicknameForWallet(account, label)
this._loadIdentities()
cb(null, label)
- this._didUpdate()
}
// mayBeFauceting
@@ -481,8 +478,6 @@ IdentityStore.prototype._createIdmgmt = function (password, seedPhrase, entropy,
})
cb()
- this._loadIdentities()
- this._didUpdate()
})
})
}
@@ -497,9 +492,9 @@ IdentityStore.prototype._createFirstWallet = function (derivedKey) {
const keyStore = this._keyStore
keyStore.setDefaultHdDerivationPath(this.hdPathString)
keyStore.generateNewAddress(derivedKey, 1)
+ this.configManager.setWallet(keyStore.serialize())
var addresses = keyStore.getAddresses()
this._ethStore.addAccount(addresses[0])
- this.configManager.setWallet(keyStore.serialize())
}
// get addresses and normalize address hexString