|
|
|
@ -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') |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|