HomePhabricator

[electrum] fix support for Ledger app versions >= 2.4.0

Description

[electrum] fix support for Ledger app versions >= 2.4.0

Summary:
See https://github.com/LedgerHQ/lib-app-bitcoin/commit/2c61ac016167e39ada8225009644358935f1cdb0

On app versions >=2.4.4 getOperationMode has been restored by Ledger to support the legacy btchip lib, but it no longer does anything useful, so no need to call it.
See https://github.com/LedgerHQ/lib-app-bitcoin/pull/5

enableAlternate2fa is still broken on v2.4.4, and if it is restored in a future version it will likewise be a no-op just for legacy support.
See https://github.com/LedgerHQ/lib-app-bitcoin/pull/7

So just skip these calls on recent versions. Keep them for previous versions of the BCH app and for HW1 support.

Test Plan: Loaded a Ledger wallet and signed a transaction with the 2.4.4 app installed.

Reviewers: #bitcoin_abc, Fabien

Reviewed By: #bitcoin_abc, Fabien

Differential Revision: https://reviews.bitcoinabc.org/D16362

Details

Provenance
PiRKAuthored on Jun 21 2024, 07:49
PiRKPushed on Jun 21 2024, 08:13
Reviewer
Restricted Project
Differential Revision
D16362: [electrum] fix support for Ledger app versions >= 2.4.0
Parents
rABC2e3c49b5123a: [electrum] handle 0x5515 status when a Ledger device is locked in screensaver…
Branches
Unknown
Tags
Unknown