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

feat: upgrade ledger keyring to fix EIP-712 issues #29874

Merged
merged 7 commits into from
Jan 23, 2025

Conversation

Akaryatrh
Copy link
Contributor

@Akaryatrh Akaryatrh commented Jan 23, 2025

Description

Ledger team request us to upgrade the @ledgerhq/hw-app-eth to 6.42.0 to fix ledger bug for EIP-712 content
Here is some comment from Kevin LAMBERT from ledger team:
and this is original thread https://consensys.slack.com/archives/C02CYKAA8G1/p1737132760664329?thread_ts=1737106010.543919&cid=C02CYKAA8G1

⚠️ There's a difference in cherry-pick from the PR opened in front of main branch. This can be explained by the fact that #withKeyringForDevice function from metamask-controller is not part of Version-v12.11.0 branch, but exists only on main branch.

As a demonstration, here's an extract of the diff between Version-v12.11.0 and feat/upgrade-ledger-library branches (the latter being used on the PR in front of main)

-    const keyring = await this.getKeyringForDevice(HardwareDeviceNames.ledger);
-    return await keyring.attemptMakeApp();
+    return await this.#withKeyringForDevice(
+      { name: HardwareDeviceNames.ledger },
+      async (keyring) => keyring.attemptMakeApp(),
+    );

Open in GitHub Codespaces

Related issues

Fixes: #29813
Please also see related PR for main branch: #29820

Manual testing steps

Will require a full regression test for ledger feature.

Screenshots/Recordings

Before

After

Pre-merge author checklist

Pre-merge reviewer checklist

  • I've manually tested the PR (e.g. pull and build branch, run the app, test code being changed).
  • I confirm that this PR addresses all acceptance criteria described in the ticket it closes and includes the necessary testing evidence such as recordings and or screenshots.

Copy link
Contributor

CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes.

Copy link

Updated dependencies detected. Learn more about Socket for GitHub ↗︎

Package New capabilities Transitives Size Publisher
npm/@metamask/[email protected] 🔁 npm/@metamask/[email protected] None +1 450 kB metamaskbot

View full report↗︎

@Akaryatrh Akaryatrh marked this pull request as ready for review January 23, 2025 12:43
@Akaryatrh Akaryatrh requested review from a team as code owners January 23, 2025 12:43
@Akaryatrh
Copy link
Contributor Author

@metamaskbot update-policies

@metamaskbot
Copy link
Collaborator

No policy changes

@metamaskbot
Copy link
Collaborator

Builds ready [234571b]
Page Load Metrics (1518 ± 46 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint13481810152110852
domContentLoaded1339179814999747
load1378181215189546
domInteractive236933147
backgroundConnect75219157
firstReactRender1495282512
getState46010157
initialActions00000
loadScripts971131611047536
setupStore56213178
uiStartup15672094175313163

Copy link
Contributor

@dbrans dbrans left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@dbrans dbrans merged commit e8b9a50 into Version-v12.11.0 Jan 23, 2025
70 of 71 checks passed
@dbrans dbrans deleted the feat/cherry-pick-upgrade-ledger-library branch January 23, 2025 13:37
@github-actions github-actions bot locked and limited conversation to collaborators Jan 23, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants