1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-12-23 09:52:26 +01:00
This commit is contained in:
Bruno 2018-06-13 02:09:25 -04:00
parent bb4cc72646
commit 704e2a21f8

View File

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