diff options
author | brunobar79 <brunobar79@gmail.com> | 2018-08-21 12:04:30 +0800 |
---|---|---|
committer | brunobar79 <brunobar79@gmail.com> | 2018-08-21 12:04:30 +0800 |
commit | cee57832835b279f9676c35c8ccc27d94368d13f (patch) | |
tree | 5a5b3ab3623b6a33922929b94d112d2371f92783 /app | |
parent | 34e3ec60927c60e8db49fb69f70c189e66b1490c (diff) | |
download | tangerine-wallet-browser-cee57832835b279f9676c35c8ccc27d94368d13f.tar tangerine-wallet-browser-cee57832835b279f9676c35c8ccc27d94368d13f.tar.gz tangerine-wallet-browser-cee57832835b279f9676c35c8ccc27d94368d13f.tar.bz2 tangerine-wallet-browser-cee57832835b279f9676c35c8ccc27d94368d13f.tar.lz tangerine-wallet-browser-cee57832835b279f9676c35c8ccc27d94368d13f.tar.xz tangerine-wallet-browser-cee57832835b279f9676c35c8ccc27d94368d13f.tar.zst tangerine-wallet-browser-cee57832835b279f9676c35c8ccc27d94368d13f.zip |
fix hardware wallets account name
Diffstat (limited to 'app')
-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 cee7bf398..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) } }) |