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: bump @metamask/eth-ledger-bridge-keyring to ^8.0.3 to fix Ledger's handling of EIP-712 content #29820

Merged
merged 13 commits into from
Jan 28, 2025

Conversation

dawnseeker8
Copy link
Contributor

@dawnseeker8 dawnseeker8 commented Jan 21, 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

Open in GitHub Codespaces

Related issues

Fixes: #29813
Please also check the related PR on release 12.11

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

socket-security bot commented Jan 21, 2025

👍 Dependency issues cleared. Learn more about Socket for GitHub ↗︎

This PR previously contained dependency changes with security issues that have been resolved, removed, or ignored.

View full report↗︎

@dawnseeker8
Copy link
Contributor Author

@SocketSecurity ignore npm/[email protected]

@dawnseeker8
Copy link
Contributor Author

@metamaskbot update-policies

@metamaskbot
Copy link
Collaborator

Policies updated.
👀 Please review the diff for suspicious new powers.

🧠 Learn how: https://lavamoat.github.io/guides/policy-diff/#what-to-look-for-when-reviewing-a-policy-diff

@metamaskbot
Copy link
Collaborator

Builds ready [745a410]
Page Load Metrics (1558 ± 88 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint13602001155718086
domContentLoaded13511987154217685
load13622000155818488
domInteractive237034146
backgroundConnect64813126
firstReactRender14103282411
getState447894
initialActions00000
loadScripts9361491110614570
setupStore55815168
uiStartup153726901790265127
Bundle size diffs [🚀 Bundle size reduced!]
  • background: -12.21 KiB (-0.21%)
  • ui: 0 Bytes (0.00%)
  • common: 0 Bytes (0.00%)

@metamaskbot
Copy link
Collaborator

Builds ready [53d360c]
Page Load Metrics (1486 ± 39 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint1395164714968038
domContentLoaded1357163514677335
load1395165914868239
domInteractive225632115
backgroundConnect65119157
firstReactRender1593393014
getState47013188
initialActions01000
loadScripts999123210816029
setupStore585232713
uiStartup15302187179820799
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: -14.06 KiB (-0.24%)
  • ui: -105 Bytes (-0.00%)
  • common: 73.09 KiB (0.84%)

@vivek-consensys
Copy link

Tested locally and working as expected via clear signing dApp .

Flows covered include:-

  • Clear signing send txn via dApp
  • Clear signing sign EIP-712 via dApp (USDC Permit & Uniswap X)
  • Personal Sign
  • Deploy ERC 721
  • Signed Typed Data v4
  • Sign Permit
  • Signed Typed Data Variants

@dawnseeker8
Copy link
Contributor Author

@metamaskbot update-policies

@metamaskbot
Copy link
Collaborator

Policies updated.
👀 Please review the diff for suspicious new powers.

🧠 Learn how: https://lavamoat.github.io/guides/policy-diff/#what-to-look-for-when-reviewing-a-policy-diff

@metamaskbot
Copy link
Collaborator

Builds ready [ece2ef7]
Page Load Metrics (1784 ± 88 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint14502266178218388
domContentLoaded14392215175617886
load14502266178418488
domInteractive21116432512
backgroundConnect86323178
firstReactRender16100392713
getState45419178
initialActions00000
loadScripts10491556128111354
setupStore67217199
uiStartup162625632070231111
Bundle size diffs [🚀 Bundle size reduced!]
  • background: -12.2 KiB (-0.21%)
  • ui: 0 Bytes (0.00%)
  • common: 0 Bytes (0.00%)

@Akaryatrh Akaryatrh marked this pull request as ready for review January 23, 2025 10:37
Copy link

socket-security bot commented Jan 23, 2025

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

Package New capabilities Transitives Size Publisher
npm/@metamask/[email protected] 🔁 npm/@metamask/[email protected] None 0 316 kB metamaskbot

View full report↗︎

@metamaskbot
Copy link
Collaborator

Builds ready [ec7dfd2]
Page Load Metrics (1786 ± 91 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint15102222178418489
domContentLoaded14922206175318287
load15132223178619091
domInteractive2410541199
backgroundConnect971332311
firstReactRender1689492512
getState56716168
initialActions01000
loadScripts10761701128916177
setupStore683162010
uiStartup174426642090262126
Bundle size diffs [🚀 Bundle size reduced!]
  • background: 20.87 KiB (0.35%)
  • ui: 0 Bytes (0.00%)
  • common: -79.01 KiB (-0.87%)

@vivek-consensys vivek-consensys added the needs-dev-review PR needs reviews from other engineers (in order to receive required approvals) label Jan 23, 2025
@gantunesr gantunesr changed the title feat: Ledger team request us to upgrade the @ledgerhq/hw-app-eth to 6.42.0 to fix ledger bug for EIP-712 content feat: upgrade the @ledgerhq/hw-app-eth to 6.42.0 to fix ledger bug for EIP-712 content Jan 24, 2025
@gantunesr gantunesr changed the title feat: upgrade the @ledgerhq/hw-app-eth to 6.42.0 to fix ledger bug for EIP-712 content feat: upgrade @ledgerhq/hw-app-eth to v6.42.0 to fix EIP-712 content ledger bug Jan 24, 2025
package.json Outdated Show resolved Hide resolved
Copy link
Contributor

@ccharly ccharly left a comment

Choose a reason for hiding this comment

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

LGTM. Haven't tested myself since we already ran full non-regression testing on this PR.

@@ -4876,7 +4876,7 @@ export default class MetamaskController extends EventEmitter {

async attemptLedgerTransportCreation() {
return await this.#withKeyringForDevice(
HardwareDeviceNames.ledger,
{ name: HardwareDeviceNames.ledger },
Copy link
Contributor

Choose a reason for hiding this comment

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

For the next reviewer: Looks like this was missing on this function. All other functions that uses this.#withKeyringForDevice were using "named parameters" already.

@@ -96,7 +96,7 @@ function setupMessageListeners(iframe: HTMLIFrameElement) {
export default async function init() {
return new Promise<void>((resolve) => {
const iframe = document.createElement('iframe');
iframe.src = 'https://metamask.github.io/ledger-iframe-bridge/8.0.0/';
iframe.src = 'https://metamask.github.io/ledger-iframe-bridge/8.0.3/';
Copy link
Contributor

Choose a reason for hiding this comment

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

For the next reviewer: The bridge version has to be aligned with the @metamask/eth-ledger-bridge-keyring package version.

@ccharly ccharly changed the title feat: upgrade @ledgerhq/hw-app-eth to v6.42.0 to fix EIP-712 content ledger bug fix: bump @metamask/eth-ledger-bridge-keyring to ^8.0.3 to fix Ledger's handling of EIP-712 content Jan 27, 2025
@metamaskbot
Copy link
Collaborator

Builds ready [e1abe95]
Page Load Metrics (1629 ± 40 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint22417761565319153
domContentLoaded1454175216117837
load1474177516298340
domInteractive268943199
backgroundConnect78120168
firstReactRender17102512813
getState55612136
initialActions00000
loadScripts1030132411657134
setupStore665192110
uiStartup16542445189018790
Bundle size diffs [🚀 Bundle size reduced!]
  • background: -12.2 KiB (-0.21%)
  • ui: 0 Bytes (0.00%)
  • common: 0 Bytes (0.00%)

@metamaskbot
Copy link
Collaborator

Builds ready [de5104b]
Page Load Metrics (1604 ± 68 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint13711997161614268
domContentLoaded13651932159113967
load13691958160414268
domInteractive2499462210
backgroundConnect84217115
firstReactRender15100402814
getState475172110
initialActions00000
loadScripts9331432115611957
setupStore75714147
uiStartup155226291878262126
Bundle size diffs [🚀 Bundle size reduced!]
  • background: -12.2 KiB (-0.21%)
  • ui: 0 Bytes (0.00%)
  • common: 0 Bytes (0.00%)

@metamaskbot
Copy link
Collaborator

Builds ready [c3ee4f3]
Page Load Metrics (1539 ± 34 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint1411170215387134
domContentLoaded1399163815156632
load1409170215397134
domInteractive1796412613
backgroundConnect97124189
firstReactRender1590422713
getState44513136
initialActions00000
loadScripts971123710926933
setupStore75411105
uiStartup16292111177312861
Bundle size diffs [🚀 Bundle size reduced!]
  • background: -12.2 KiB (-0.21%)
  • ui: 0 Bytes (0.00%)
  • common: 0 Bytes (0.00%)

@angelcheung22 angelcheung22 added this pull request to the merge queue Jan 28, 2025
Merged via the queue into main with commit e2fea0f Jan 28, 2025
70 checks passed
@angelcheung22 angelcheung22 deleted the feat/upgrade-ledger-library branch January 28, 2025 10:14
@github-actions github-actions bot removed the needs-dev-review PR needs reviews from other engineers (in order to receive required approvals) label Jan 28, 2025
@github-actions github-actions bot locked and limited conversation to collaborators Jan 28, 2025
@metamaskbot metamaskbot added the release-12.12.0 Issue or pull request that will be included in release 12.12.0 label Jan 28, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
QA Passed release-12.12.0 Issue or pull request that will be included in release 12.12.0 team-hardware-wallets
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

[Bug] Upgrade hw-app-eth library to v6.42.0 for Ledger Clear Signing
7 participants