accounts, console, internal: support trezor hardware wallet

This commit is contained in:
Péter Szilágyi committed 2017-08-09 11:30:17 +03:00
1 parent 17ce0a37de
commit db568a61e2
38 files changed
+17063 -38

No files matched your search

+7
View File
@@ -393,11 +393,18 @@ func makeAccountManager(conf *Config) (*accounts.Manager, string, error) {
keystore.NewKeyStore(keydir, scryptN, scryptP),
}
if !conf.NoUSB {
// Start a USB hub for Ledger hardware wallets
if ledgerhub, err := usbwallet.NewLedgerHub(); err != nil {
log.Warn(fmt.Sprintf("Failed to start Ledger hub, disabling: %v", err))
} else {
backends = append(backends, ledgerhub)
}
// Start a USB hub for Trezor hardware wallets
if trezorhub, err := usbwallet.NewTrezorHub(); err != nil {
log.Warn(fmt.Sprintf("Failed to start Trezor hub, disabling: %v", err))
} else {
backends = append(backends, trezorhub)
}
}
return accounts.NewManager(backends...), ephemeral, nil
}