Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(connect): eip1559 correct maxFeePerGas #15907

Merged
merged 4 commits into from
Dec 11, 2024

Conversation

martykan
Copy link
Member

@martykan martykan commented Dec 11, 2024

Description

There was a bug in EIP1559 message signing, which led to a mismatch between the FW message and Ethereumjs serialized message.

A previous fix in #15322 was applied, but the idea behind it was completely incorrect, the actual original issue was just that the boolean condition was reversed.

Several steps are taken to prevent this in the future:

  • The logic was moved from ethereumSignTx to serializeEthereumTx, which works with Trezor's message types
  • serializeEthereumTx was improved. It no longer uses type casts so the input type is actually checked. Correct Common object is loaded based on chainId
  • Tests for serializeEthereumTx were improved, they also validate the from address and a test case for EIP-1559 was added

@martykan martykan marked this pull request as ready for review December 11, 2024 11:53
@martykan martykan merged commit 386dc36 into develop Dec 11, 2024
54 checks passed
@martykan martykan deleted the fix/connect-eip1559-maxfeepergas branch December 11, 2024 14:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants