mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-23 09:52:26 +01:00
fix hardware wallets account name
This commit is contained in:
parent
34e3ec6092
commit
cee5783283
@ -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)
|
||||
}
|
||||
})
|
||||
|
Loading…
Reference in New Issue
Block a user