Skip to content

Commit

Permalink
Workaround for the incompatibility with the btchip client library int…
Browse files Browse the repository at this point in the history
…roduced in the Ledger Dash app v2.0.4
  • Loading branch information
Bertrand256 committed May 1, 2022
1 parent 3e00202 commit 52c7a20
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 5 deletions.
4 changes: 2 additions & 2 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@ python-bitcoinrpc>=1.0
bitcoin>=1.1.42
trezor==0.12.2
keepkey
libusb1~=1.9.2
libusb1~=3.0.0
PyQt5==5.15.3
PyQtChart==5.15.3
pyinstaller==4.4; sys_platform == 'linux'
pyinstaller>=4.3; sys_platform == 'darwin'
pyinstaller>=4.3; sys_platform == 'win32'
paramiko~=2.9.2
paramiko~=2.10.4
requests
mnemonic~=0.19
simplejson~=3.17.2
Expand Down
2 changes: 1 addition & 1 deletion src/hw_intf.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ def catch_hw_client(*args, **kwargs):
hw_session: HwSessionInfo = args[0]
client = hw_session.hw_client
if not client:
client = hw_session.hw_connect()
client = hw_session.connect_hardware_wallet()
if not client:
raise HWNotConnectedException()
try:
Expand Down
7 changes: 7 additions & 0 deletions src/hw_intf_ledgernano.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,13 @@ def getTrustedInput(self, transaction, index):
result['value'] = response
return result

def getJCExtendedFeatures(self):
# Workaround for the incompatibility with the btchip client library introduced in the Ledger Dash app v2.0.4:
# mask the original call to 'getJCExtendedFeatures', which destabilizes communication with the device
# by sending the BTCHIP_INS_EXT_CACHE_GET_FEATURES command
result = {'proprietaryApi': True}
return result


def process_ledger_exceptions(func):
"""
Expand Down
2 changes: 1 addition & 1 deletion src/ui/ui_recover_hw_wdg.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

# Form implementation generated from reading ui file ui_recover_hw_wdg.ui
#
# Created by: PyQt5 UI code generator 5.15.1
# Created by: PyQt5 UI code generator
#
# WARNING: Any manual changes made to this file will be lost when pyuic5 is
# run again. Do not edit this file unless you know what you are doing.
Expand Down
2 changes: 1 addition & 1 deletion version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
version_str = '0.9.30'
version_str = '0.9.31'

0 comments on commit 52c7a20

Please sign in to comment.