aboutsummaryrefslogtreecommitdiffstats
path: root/app
diff options
context:
space:
mode:
authorDan Finlay <dan@danfinlay.com>2016-09-13 05:22:06 +0800
committerDan Finlay <dan@danfinlay.com>2016-09-13 05:22:06 +0800
commit0d11eab8cbb8f88c77a5d9eebf87a5796a585c93 (patch)
treeca1f6d88bd3b421a7c8cff2220615fee2784f2bf /app
parent6fcbb43c504b7a76cc28e47f1d63adf06264415f (diff)
downloadtangerine-wallet-browser-0d11eab8cbb8f88c77a5d9eebf87a5796a585c93.tar
tangerine-wallet-browser-0d11eab8cbb8f88c77a5d9eebf87a5796a585c93.tar.gz
tangerine-wallet-browser-0d11eab8cbb8f88c77a5d9eebf87a5796a585c93.tar.bz2
tangerine-wallet-browser-0d11eab8cbb8f88c77a5d9eebf87a5796a585c93.tar.lz
tangerine-wallet-browser-0d11eab8cbb8f88c77a5d9eebf87a5796a585c93.tar.xz
tangerine-wallet-browser-0d11eab8cbb8f88c77a5d9eebf87a5796a585c93.tar.zst
tangerine-wallet-browser-0d11eab8cbb8f88c77a5d9eebf87a5796a585c93.zip
Add accounts back to metamask state
Diffstat (limited to 'app')
-rw-r--r--app/scripts/lib/idStore.js6
1 files changed, 5 insertions, 1 deletions
diff --git a/app/scripts/lib/idStore.js b/app/scripts/lib/idStore.js
index d33a67387..0c6d7c2dd 100644
--- a/app/scripts/lib/idStore.js
+++ b/app/scripts/lib/idStore.js
@@ -148,6 +148,10 @@ IdentityStore.prototype.revealAccount = function (cb) {
keyStore.setDefaultHdDerivationPath(this.hdPathString)
keyStore.generateNewAddress(derivedKey, 1)
+ const addresses = ks.getAddresses();
+ const address = addresses[ addresses.length -1 ]
+
+ this._ethStore.addAccount(ethUtil.addHexPrefix(address))
configManager.setWallet(keyStore.serialize())
@@ -496,7 +500,7 @@ IdentityStore.prototype._createIdMgmt = function (derivedKey) {
IdentityStore.prototype.purgeCache = function () {
this._getAddresses().forEach((address) => {
- this._ethStore.del(address)
+ this._ethStore.del(ethUtil.addHexPrefix(address))
})
}