Browse Source

hww: ledger: bump required ledger-bitcoin and adapt to API change

master
SomberNight 3 years ago
parent
commit
3020499199
No known key found for this signature in database
GPG Key ID: B33B5F232C6271E9
  1. 12
      contrib/deterministic-build/requirements-hw.txt
  2. 3
      contrib/requirements/requirements-hw.txt
  3. 8
      electrum/plugins/ledger/ledger.py

12
contrib/deterministic-build/requirements-hw.txt

@ -152,12 +152,12 @@ keepkey==6.3.1 \
--hash=sha256:88e2b5291c85c8e8567732f675697b88241082884aa1aba32257f35ee722fc09 \ --hash=sha256:88e2b5291c85c8e8567732f675697b88241082884aa1aba32257f35ee722fc09 \
--hash=sha256:cef1e862e195ece3e42640a0f57d15a63086fd1dedc8b5ddfcbc9c2657f0bb1e \ --hash=sha256:cef1e862e195ece3e42640a0f57d15a63086fd1dedc8b5ddfcbc9c2657f0bb1e \
--hash=sha256:f369d640c65fec7fd8e72546304cdc768c04224a6b9b00a19dc2cd06fa9d2a6b --hash=sha256:f369d640c65fec7fd8e72546304cdc768c04224a6b9b00a19dc2cd06fa9d2a6b
ledger-bitcoin==0.1.1 \ ledger-bitcoin==0.2.1 \
--hash=sha256:15eb5e95e38d45a5f46468890cd69b066acbab855ca8a68073823cf545477f18 \ --hash=sha256:01697fab6333ceca4d228eb27f7d12f763e033f620b1bfb5949b20ec0b33b6ca \
--hash=sha256:8d594d54ce3cecd7385e7a4a357fe96b27518fc83b754a0b4339c2325b4a0a3c --hash=sha256:1160aa887df9f88539110c3c88535fc838cfff26600a326df23b4a09f09036f1
ledgercomm==1.1.1 \ ledgercomm==1.1.2 \
--hash=sha256:1273b99b69bef05ef39fa740c8e09ecd631c24cd3fcdb65dac7903408da509c9 \ --hash=sha256:8b338f6f0bfedf85eaf26a6af7e41120685dfb3e2956718948c9d83a4b5155bb \
--hash=sha256:ae071e4f3d0897c7ed209c3359cf2438855ac1d9cee4ca48f41bd0506e1c1b2f --hash=sha256:e3a39198b7c01135d7bdb049948ac41ce22cd8d39ddf6fbfc236a228d560a0ce
libusb1==3.0.0 \ libusb1==3.0.0 \
--hash=sha256:083f75e5d15cb5e2159e64c308c5317284eae926a820d6dce53a9505d18be3b2 \ --hash=sha256:083f75e5d15cb5e2159e64c308c5317284eae926a820d6dce53a9505d18be3b2 \
--hash=sha256:0e652b04cbe85ec8e74f9ee82b49f861fb14b5320ae51399387ad2601ccc0500 \ --hash=sha256:0e652b04cbe85ec8e74f9ee82b49f861fb14b5320ae51399387ad2601ccc0500 \

3
contrib/requirements/requirements-hw.txt

@ -15,7 +15,8 @@ keepkey>=6.3.1
# device plugin: ledger # device plugin: ledger
# note: btchip-python only needed for "legacy" protocol and HW.1 support # note: btchip-python only needed for "legacy" protocol and HW.1 support
btchip-python>=0.1.32 btchip-python>=0.1.32
ledger-bitcoin>=0.1.1,<0.2.0 ledger-bitcoin>=0.2.0,<0.3.0
hidapi
# device plugin: coldcard # device plugin: coldcard
ckcc-protocol>=0.7.7 ckcc-protocol>=0.7.7

8
electrum/plugins/ledger/ledger.py

@ -1235,8 +1235,9 @@ class Ledger_Client_New(Ledger_Client):
# For each wallet, sign # For each wallet, sign
for __, (__, wallet, wallet_hmac) in wallets.items(): for __, (__, wallet, wallet_hmac) in wallets.items():
input_sigs = self.client.sign_psbt(psbt, wallet, wallet_hmac) input_sigs = self.client.sign_psbt(psbt, wallet, wallet_hmac)
for idx, pubkey, sig in input_sigs: for idx, part_sig in input_sigs:
tx.add_signature_to_txin(txin_idx=idx, signing_pubkey=pubkey.hex(), sig=sig.hex()) tx.add_signature_to_txin(
txin_idx=idx, signing_pubkey=part_sig.pubkey.hex(), sig=part_sig.signature.hex())
except DenyError: except DenyError:
pass # cancelled by user pass # cancelled by user
except BaseException as e: except BaseException as e:
@ -1317,7 +1318,8 @@ class Ledger_KeyStore(Hardware_KeyStore):
class LedgerPlugin(HW_PluginBase): class LedgerPlugin(HW_PluginBase):
keystore_class = Ledger_KeyStore keystore_class = Ledger_KeyStore
minimum_library = (0, 1, 1) minimum_library = (0, 2, 0)
maximum_library = (0, 3, 0)
DEVICE_IDS = [(0x2581, 0x1807), # HW.1 legacy btchip DEVICE_IDS = [(0x2581, 0x1807), # HW.1 legacy btchip
(0x2581, 0x2b7c), # HW.1 transitional production (0x2581, 0x2b7c), # HW.1 transitional production
(0x2581, 0x3b7c), # HW.1 ledger production (0x2581, 0x3b7c), # HW.1 ledger production

Loading…
Cancel
Save