diff options
author | brunobar79 <brunobar79@gmail.com> | 2018-07-10 05:55:37 +0800 |
---|---|---|
committer | brunobar79 <brunobar79@gmail.com> | 2018-07-10 05:55:37 +0800 |
commit | 2de3039b6b21ca05ef185c078b67815448864c72 (patch) | |
tree | 6a4c69bfc8d3d0823b717ef67224230cfaac13a0 /app/scripts/metamask-controller.js | |
parent | 7cca7ace2ea4cd4b9d3a242067c9a7c344406aba (diff) | |
download | tangerine-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.js | 4 |
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: |