aboutsummaryrefslogtreecommitdiffstats
path: root/app/scripts/metamask-controller.js
diff options
context:
space:
mode:
authorbrunobar79 <brunobar79@gmail.com>2018-07-10 05:55:37 +0800
committerbrunobar79 <brunobar79@gmail.com>2018-07-10 05:55:37 +0800
commit2de3039b6b21ca05ef185c078b67815448864c72 (patch)
tree6a4c69bfc8d3d0823b717ef67224230cfaac13a0 /app/scripts/metamask-controller.js
parent7cca7ace2ea4cd4b9d3a242067c9a7c344406aba (diff)
downloadtangerine-wallet-browser-2de3039b6b21ca05ef185c078b67815448864c72.tar
tangerine-wallet-browser-2de3039b6b21ca05ef185c078b67815448864c72.tar.gz
tangerine-wallet-browser-2de3039b6b21ca05ef185c078b67815448864c72.tar.bz2
tangerine-wallet-browser-2de3039b6b21ca05ef185c078b67815448864c72.tar.lz
tangerine-wallet-browser-2de3039b6b21ca05ef185c078b67815448864c72.tar.xz
tangerine-wallet-browser-2de3039b6b21ca05ef185c078b67815448864c72.tar.zst
tangerine-wallet-browser-2de3039b6b21ca05ef185c078b67815448864c72.zip
fix account duplication
Diffstat (limited to 'app/scripts/metamask-controller.js')
-rw-r--r--app/scripts/metamask-controller.js4
1 files changed, 3 insertions, 1 deletions
diff --git a/app/scripts/metamask-controller.js b/app/scripts/metamask-controller.js
index 8104374bc..08b75e839 100644
--- a/app/scripts/metamask-controller.js
+++ b/app/scripts/metamask-controller.js
@@ -550,7 +550,9 @@ module.exports = class MetamaskController extends EventEmitter {
}
// Merge with existing accounts
- this.accountTracker.syncWithAddresses(oldAccounts.concat(accounts.map(a => a.address)))
+ // and make sure addresses are not repeated
+ const accountsToTrack = [...new Set(oldAccounts.concat(accounts.map(a => a.address.toLowerCase())))]
+ this.accountTracker.syncWithAddresses(accountsToTrack)
return accounts
default: