Skip to content

Commit

Permalink
Fix chain id in Ledger patch
Browse files Browse the repository at this point in the history
  • Loading branch information
Shadowfiend committed Nov 2, 2023
1 parent 423c007 commit 629807b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions patches/@ledgerhq+hw-app-eth+6.33.4.patch
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ index f3815c8..7581b15 100644
else {
// Legacy type transaction with a big chain ID
- v = chainId.times(2).plus(35).plus(ecc_parity).toString(16);
+ v = chainId.times(2).plus(35).plus(chainIdTruncated === 412614 ? ecc_parity % 2 : ecc_parity).toString(16);
+ v = chainId.times(2).plus(35).plus(chainIdTruncated === 421614 ? ecc_parity % 2 : ecc_parity).toString(16);
}
}
else {
Expand All @@ -20,7 +20,7 @@ index 4a7cb64..f11819b 100644
else {
// Legacy type transaction with a big chain ID
- v = chainId.times(2).plus(35).plus(ecc_parity).toString(16);
+ v = chainId.times(2).plus(35).plus(chainIdTruncated === 412614 ? ecc_parity % 2 : ecc_parity).toString(16);
+ v = chainId.times(2).plus(35).plus(chainIdTruncated === 421614 ? ecc_parity % 2 : ecc_parity).toString(16);
}
}
else {
Expand All @@ -33,7 +33,7 @@ index a501e97..72f63eb 100644
} else {
// Legacy type transaction with a big chain ID
- v = chainId.times(2).plus(35).plus(ecc_parity).toString(16);
+ v = chainId.times(2).plus(35).plus(chainIdTruncated === 412614 ? ecc_parity % 2 : ecc_parity).toString(16);
+ v = chainId.times(2).plus(35).plus(chainIdTruncated === 421614 ? ecc_parity % 2 : ecc_parity).toString(16);
}
} else {
v = response_byte.toString(16);

0 comments on commit 629807b

Please sign in to comment.