From 52c7a20042d2d7567fc50e60bd34b10fea166f3f Mon Sep 17 00:00:00 2001 From: Bertrand256 Date: Sun, 1 May 2022 18:15:53 +0200 Subject: [PATCH] Workaround for the incompatibility with the btchip client library introduced in the Ledger Dash app v2.0.4 --- requirements.txt | 4 ++-- src/hw_intf.py | 2 +- src/hw_intf_ledgernano.py | 7 +++++++ src/ui/ui_recover_hw_wdg.py | 2 +- version.txt | 2 +- 5 files changed, 12 insertions(+), 5 deletions(-) diff --git a/requirements.txt b/requirements.txt index e9053e7d..d05dd301 100644 --- a/requirements.txt +++ b/requirements.txt @@ -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 diff --git a/src/hw_intf.py b/src/hw_intf.py index f1d53233..2ca54b72 100644 --- a/src/hw_intf.py +++ b/src/hw_intf.py @@ -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: diff --git a/src/hw_intf_ledgernano.py b/src/hw_intf_ledgernano.py index d528183e..81576b61 100644 --- a/src/hw_intf_ledgernano.py +++ b/src/hw_intf_ledgernano.py @@ -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): """ diff --git a/src/ui/ui_recover_hw_wdg.py b/src/ui/ui_recover_hw_wdg.py index 36f44a93..bb65bac2 100644 --- a/src/ui/ui_recover_hw_wdg.py +++ b/src/ui/ui_recover_hw_wdg.py @@ -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. diff --git a/version.txt b/version.txt index 4dd4e04a..3607d348 100644 --- a/version.txt +++ b/version.txt @@ -1 +1 @@ -version_str = '0.9.30' +version_str = '0.9.31'