mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-17 17:33:47 +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 _, info := range hid.Enumerate(hub.vendorID, 0) {
|
||||||
for _, id := range hub.productIDs {
|
for _, id := range hub.productIDs {
|
||||||
if info.ProductID == id && info.Interface == 0 {
|
// The HID interface number is not available on windows and OSX
|
||||||
devices = append(devices, info)
|
if runtime.GOOS == "darwin" || runtime.GOOS == "windows" {
|
||||||
break
|
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" {
|
if runtime.GOOS == "linux" {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue