Browse Source

Add support for Ledger Stax (#8308)

* Add support for Ledger Stax
master
Victor Forgeoux 3 years ago committed by GitHub
parent
commit
ee61f99c22
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      contrib/udev/20-hw1.rules
  2. 5
      electrum/plugins/ledger/ledger.py

2
contrib/udev/20-hw1.rules

@ -12,3 +12,5 @@ SUBSYSTEMS=="usb", ATTRS{idVendor}=="2c97", ATTRS{idProduct}=="0003|3000|3001|30
SUBSYSTEMS=="usb", ATTRS{idVendor}=="2c97", ATTRS{idProduct}=="0004|4000|4001|4002|4003|4004|4005|4006|4007|4008|4009|400a|400b|400c|400d|400e|400f|4010|4011|4012|4013|4014|4015|4016|4017|4018|4019|401a|401b|401c|401d|401e|401f", TAG+="uaccess", TAG+="udev-acl"
# Nano S Plus
SUBSYSTEMS=="usb", ATTRS{idVendor}=="2c97", ATTRS{idProduct}=="0005|5000|5001|5002|5003|5004|5005|5006|5007|5008|5009|500a|500b|500c|500d|500e|500f|5010|5011|5012|5013|5014|5015|5016|5017|5018|5019|501a|501b|501c|501d|501e|501f", TAG+="uaccess", TAG+="udev-acl"
# Stax
SUBSYSTEMS=="usb", ATTRS{idVendor}=="2c97", ATTRS{idProduct}=="0006|6000|6001|6002|6003|6004|6005|6006|6007|6008|6009|600a|600b|600c|600d|600e|600f|6010|6011|6012|6013|6014|6015|6016|6017|6018|6019|601a|601b|601c|601d|601e|601f", TAG+="uaccess", TAG+="udev-acl"

5
electrum/plugins/ledger/ledger.py

@ -1322,7 +1322,7 @@ class LedgerPlugin(HW_PluginBase):
(0x2c97, 0x0001), # Nano-S
(0x2c97, 0x0004), # Nano-X
(0x2c97, 0x0005), # Nano-S Plus
(0x2c97, 0x0006), # RFU
(0x2c97, 0x0006), # Stax
(0x2c97, 0x0007), # RFU
(0x2c97, 0x0008), # RFU
(0x2c97, 0x0009), # RFU
@ -1332,6 +1332,7 @@ class LedgerPlugin(HW_PluginBase):
0x10: "Ledger Nano S",
0x40: "Ledger Nano X",
0x50: "Ledger Nano S Plus",
0x60: "Ledger Stax",
}
SUPPORTED_XTYPES = ('standard', 'p2wpkh-p2sh', 'p2wpkh', 'p2wsh-p2sh', 'p2wsh')
@ -1380,6 +1381,8 @@ class LedgerPlugin(HW_PluginBase):
return True, "Ledger Nano X"
if product_key == (0x2c97, 0x0005):
return True, "Ledger Nano S Plus"
if product_key == (0x2c97, 0x0006):
return True, "Ledger Stax"
return True, None
# modern product_keys
if product_key[0] == 0x2c97:

Loading…
Cancel
Save