feature/default_network_editable
Bruno 7 years ago
parent bb4cc72646
commit 704e2a21f8
  1. 9
      app/scripts/metamask-controller.js

@ -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…
Cancel
Save