mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-17 09:23:48 +00:00
accounts/usbwallet: Fix Ledger nano S not working on OSX and Windows
This commit is contained in:
parent
a660685746
commit
307a5e610c
1 changed files with 12 additions and 3 deletions
|
|
@ -133,10 +133,19 @@ func (hub *Hub) refreshWallets() {
|
|||
}
|
||||
for _, info := range hid.Enumerate(hub.vendorID, 0) {
|
||||
for _, id := range hub.productIDs {
|
||||
if info.ProductID == id && info.Interface == 0 {
|
||||
devices = append(devices, info)
|
||||
break
|
||||
// The HID interface number is not available on windows and OSX
|
||||
if runtime.GOOS == "darwin" || runtime.GOOS == "windows" {
|
||||
if info.ProductID == id && info.Interface == -1 {
|
||||
devices = append(devices, info)
|
||||
break
|
||||
}
|
||||
} else {
|
||||
if info.ProductID == id && info.Interface == 0 {
|
||||
devices = append(devices, info)
|
||||
break
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
if runtime.GOOS == "linux" {
|
||||
|
|
|
|||
Loading…
Reference in a new issue