mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-17 01:13:45 +00:00
Merge 307a5e610c into f4c49bc0f0
This commit is contained in:
commit
1fb772a6a1
1 changed files with 12 additions and 3 deletions
|
|
@ -133,11 +133,20 @@ func (hub *Hub) refreshWallets() {
|
|||
}
|
||||
for _, info := range hid.Enumerate(hub.vendorID, 0) {
|
||||
for _, id := range hub.productIDs {
|
||||
// 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" {
|
||||
// See rationale before the enumeration why this is needed and only on Linux.
|
||||
|
|
|
|||
Loading…
Reference in a new issue