Sepo-Ledger: Patch @ledgerhq/hw-app-eth for Arbitrum Sepolia chain id handling #3650
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
It currently seems like there is an issue with Ledger's handling of high chain ids for certain transactions, where the Ledger can provide a first byte that breaks the expectations of the chain id adjustment done for legacy transactions to conform to EIP-155. The resulting
v
value returned from the signing flow is invalid and Ethers throws because of this.This fix may be correct, but it may not be. To adjust for this fact, the patch limits adjustments of the underlying parity value in Ledger to happen only when the chain id matches Arbitrum Sepolia's (412614), as that's the only place we've seen consistent reports of the issue.
See also LedgerHQ/ledger-live#5265 .
Fixes #3647 .
Testing
Latest build: extension-builds-3650 (as of Thu, 02 Nov 2023 02:14:12 GMT).