aboutsummaryrefslogtreecommitdiffstats
path: root/app
diff options
context:
space:
mode:
authorkumavis <aaron@kumavis.me>2018-06-04 03:02:35 +0800
committerkumavis <aaron@kumavis.me>2018-06-04 03:02:35 +0800
commiteb3241ccba8e08d694f6887cae56daabace9efe9 (patch)
tree6fa6c1d179c5eba9caafbc66e74f42671ffc2c7f /app
parent54a9c62fd66a367ebca8ae963c080eb8eb9db0a7 (diff)
downloadtangerine-wallet-browser-eb3241ccba8e08d694f6887cae56daabace9efe9.tar
tangerine-wallet-browser-eb3241ccba8e08d694f6887cae56daabace9efe9.tar.gz
tangerine-wallet-browser-eb3241ccba8e08d694f6887cae56daabace9efe9.tar.bz2
tangerine-wallet-browser-eb3241ccba8e08d694f6887cae56daabace9efe9.tar.lz
tangerine-wallet-browser-eb3241ccba8e08d694f6887cae56daabace9efe9.tar.xz
tangerine-wallet-browser-eb3241ccba8e08d694f6887cae56daabace9efe9.tar.zst
tangerine-wallet-browser-eb3241ccba8e08d694f6887cae56daabace9efe9.zip
metamask-controller - clear account labels on restore from seed phrase
Diffstat (limited to 'app')
-rw-r--r--app/scripts/metamask-controller.js4
1 files changed, 4 insertions, 0 deletions
diff --git a/app/scripts/metamask-controller.js b/app/scripts/metamask-controller.js
index 46f4a79a8..96f976568 100644
--- a/app/scripts/metamask-controller.js
+++ b/app/scripts/metamask-controller.js
@@ -458,7 +458,11 @@ module.exports = class MetamaskController extends EventEmitter {
async createNewVaultAndRestore (password, seed) {
const release = await this.createVaultMutex.acquire()
try {
+ // clear known identities
+ this.preferencesController.setAddresses([])
+ // create new vault
const vault = await this.keyringController.createNewVaultAndRestore(password, seed)
+ // set new identities
const accounts = await this.keyringController.getAccounts()
this.preferencesController.setAddresses(accounts)
this.selectFirstIdentity()