mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-23 09:52:26 +01:00
clean up
This commit is contained in:
parent
bb4cc72646
commit
704e2a21f8
@ -423,7 +423,6 @@ module.exports = class MetamaskController extends EventEmitter {
|
||||
}
|
||||
|
||||
|
||||
|
||||
//=============================================================================
|
||||
// VAULT / KEYRING RELATED METHODS
|
||||
//=============================================================================
|
||||
@ -537,6 +536,8 @@ module.exports = class MetamaskController extends EventEmitter {
|
||||
*/
|
||||
async connectHardware (deviceName, page) {
|
||||
|
||||
switch (deviceName) {
|
||||
case 'trezor':
|
||||
const keyringController = this.keyringController
|
||||
const keyring = await keyringController.getKeyringsByType(
|
||||
'Trezor Hardware'
|
||||
@ -546,10 +547,12 @@ module.exports = class MetamaskController extends EventEmitter {
|
||||
}
|
||||
|
||||
const accounts = await keyring.getPage(page)
|
||||
|
||||
this.accountTracker.syncWithAddresses(accounts.map(a => a.address))
|
||||
|
||||
return accounts
|
||||
|
||||
default:
|
||||
throw new Error('MetamaskController - Unknown device')
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user