diff options
author | brunobar79 <brunobar79@gmail.com> | 2018-08-22 03:58:29 +0800 |
---|---|---|
committer | brunobar79 <brunobar79@gmail.com> | 2018-08-22 03:58:29 +0800 |
commit | 90886c5e05469d2b8935ac9b744cf296107a2406 (patch) | |
tree | a4c03964d6607411b5b7bbff4e3f336959dd7134 /app | |
parent | 0e1605b0829373d087d87c7be83046125ecd9e1f (diff) | |
parent | 4704f3598e3a570b536b3d334d72fcc06d2d15c0 (diff) | |
download | tangerine-wallet-browser-90886c5e05469d2b8935ac9b744cf296107a2406.tar tangerine-wallet-browser-90886c5e05469d2b8935ac9b744cf296107a2406.tar.gz tangerine-wallet-browser-90886c5e05469d2b8935ac9b744cf296107a2406.tar.bz2 tangerine-wallet-browser-90886c5e05469d2b8935ac9b744cf296107a2406.tar.lz tangerine-wallet-browser-90886c5e05469d2b8935ac9b744cf296107a2406.tar.xz tangerine-wallet-browser-90886c5e05469d2b8935ac9b744cf296107a2406.tar.zst tangerine-wallet-browser-90886c5e05469d2b8935ac9b744cf296107a2406.zip |
Merge branch 'develop' of github.com:MetaMask/metamask-extension into trezor-v5
Diffstat (limited to 'app')
-rw-r--r-- | app/scripts/metamask-controller.js | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/app/scripts/metamask-controller.js b/app/scripts/metamask-controller.js index 2d7d2c671..29838ad2d 100644 --- a/app/scripts/metamask-controller.js +++ b/app/scripts/metamask-controller.js @@ -668,7 +668,9 @@ module.exports = class MetamaskController extends EventEmitter { this.preferencesController.setAddresses(newAccounts) newAccounts.forEach(address => { if (!oldAccounts.includes(address)) { - this.preferencesController.setAccountLabel(address, `${deviceName.toUpperCase()} ${parseInt(index, 10) + 1}`) + // Set the account label to Trezor 1 / Ledger 1, etc + this.preferencesController.setAccountLabel(address, `${deviceName[0].toUpperCase()}${deviceName.slice(1)} ${parseInt(index, 10) + 1}`) + // Select the account this.preferencesController.setSelectedAddress(address) } }) @@ -800,7 +802,8 @@ module.exports = class MetamaskController extends EventEmitter { // Remove account from the preferences controller this.preferencesController.removeAddress(address) // Remove account from the account tracker controller - this.accountTracker.removeAccount(address) + this.accountTracker.removeAccount([address]) + // Remove account from the keyring await this.keyringController.removeAccount(address) return address |