mirror of
https://github.com/LBRYFoundation/LBRY-Vault.git
synced 2025-08-31 01:11:35 +00:00
fix ledger: nano s did not work reliably since last fw update
follow LedgerHQ/btchip-python@6e985b558f
This commit is contained in:
parent
db9cb63e79
commit
cd19f788cc
1 changed files with 9 additions and 2 deletions
|
@ -523,8 +523,15 @@ class LedgerPlugin(HW_PluginBase):
|
|||
|
||||
def get_btchip_device(self, device):
|
||||
ledger = False
|
||||
if (device.product_key[0] == 0x2581 and device.product_key[1] == 0x3b7c) or (device.product_key[0] == 0x2581 and device.product_key[1] == 0x4b7c) or (device.product_key[0] == 0x2c97):
|
||||
ledger = True
|
||||
if device.product_key[0] == 0x2581 and device.product_key[1] == 0x3b7c:
|
||||
ledger = True
|
||||
if device.product_key[0] == 0x2581 and device.product_key[1] == 0x4b7c:
|
||||
ledger = True
|
||||
if device.product_key[0] == 0x2c97:
|
||||
if device.interface_number == 0 or device.usage_page == 0xffa0:
|
||||
ledger = True
|
||||
else:
|
||||
return None # non-compatible interface of a nano s or blue
|
||||
dev = hid.device()
|
||||
dev.open_path(device.path)
|
||||
dev.set_nonblocking(True)
|
||||
|
|
Loading…
Add table
Reference in a new issue