Skip to content

fix: show blind signing guidance on Ledger reconnect repair - #45433

Open
gantunesr wants to merge 3 commits into
mainfrom
gar/fix/recoonect-with-blind-signing
Open

fix: show blind signing guidance on Ledger reconnect repair#45433
gantunesr wants to merge 3 commits into
mainfrom
gar/fix/recoonect-with-blind-signing

Conversation

@gantunesr

@gantunesr gantunesr commented Aug 11, 2026

Copy link
Copy Markdown
Member

Description

When reconnecting a Ledger via “Reconnect from the beginning” with blind signing disabled, the repair page showed “Device not detected…” even though the device was connected and the Ethereum app was open.

The shared ensureDeviceReady helper catches hardware-wallet errors and returns false, so the repair page lost the blind sign error and always mapped failure to the generic not-detected message. Blind signing failures were also mapped to a disconnect device event.

This change:

  1. Uses ensureRepairDeviceReady on the repair page when a wallet type is known, so device-state errors (including blind signing disabled) throw and can be surfaced.
  2. Maps DeviceStateBlindSignNotSupported to the localized “Enable blind signing” message.
  3. Maps blind-signing-not-supported to ConnectionFailed instead of Disconnected, so the device is not treated as unplugged.

Changelog

CHANGELOG entry: Fixed Ledger reconnect repair showing “Device not detected” when blind signing was disabled instead of prompting to enable blind signing

Related issues

Fixes: #43597
Fixes: https://consensyssoftware.atlassian.net/browse/MUL-2052

Manual testing steps

Check #43597

Screenshots/Recordings

Before

Check #43597

After

Screen.Recording.2026-08-11.at.6.04.16.PM.mov

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.

Note

Low Risk
Targeted UX/error-mapping fix in the hardware-wallet repair reconnect path; no auth, signing, or transport protocol changes.

Overview
Fixes Ledger Reconnect from the beginning so a connected device with blind signing disabled no longer shows “Device not detected”.

When a wallet type is known, the repair page now prefers ensureRepairDeviceReady so device-state errors can throw instead of being collapsed to false by shared ensureDeviceReady. Blind-signing failures map to the localized enable-blind-signing message via getRepairConnectErrorMessage.

Also maps DeviceStateBlindSignNotSupported to DeviceEvent.ConnectionFailed (not Disconnected), so the device is treated as a settings issue rather than unplugged.

Reviewed by Cursor Bugbot for commit bf35d94. Bugbot is set up for automated code reviews on this repo. Configure here.

@gantunesr
gantunesr deployed to pr-comment August 11, 2026 22:08 — with GitHub Actions Active
@metamask-ci

metamask-ci Bot commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

✨ Files requiring CODEOWNER review ✨

🔑 @MetaMask/accounts-engineers (2 files, +4 -1)
  • 📁 ui/
    • 📁 contexts/
      • 📁 hardware-wallets/
        • 📁 adapters/
          • 📄 LedgerAdapter.test.ts +1 -1
          • 📄 errors.ts +3 -0

@metamask-ci metamask-ci Bot added the team-accounts-framework Accounts team label Aug 11, 2026
@gantunesr
gantunesr marked this pull request as ready for review August 11, 2026 22:09
@gantunesr
gantunesr requested a review from a team as a code owner August 11, 2026 22:09
@gantunesr
gantunesr deployed to pr-comment August 11, 2026 22:09 — with GitHub Actions Active
@sonarqubecloud

Copy link
Copy Markdown

@gantunesr
gantunesr deployed to pr-comment August 11, 2026 22:35 — with GitHub Actions Active
@metamask-ci

metamask-ci Bot commented Aug 11, 2026

Copy link
Copy Markdown
Contributor
Builds ready [83b3751]
⚡ Performance Benchmarks (Total: 🟢 13 pass · 🟡 9 warn · 🔴 2 fail)

Baseline (latest main): 171ed20 | Date: 7/28/2026 | Pipeline: 31541105047 | Baseline logs

Metricschrome-webpackfirefox-webpack
onboardingImportWallet
[Sentry log · main/release]
🔴 srpButtonToSrpForm(p95) [CI log]🟢 [CI log]
onboardingNewWallet
[Sentry log · main/release]
🔴 doneButtonToAssetList(p75) [CI log]🟢 [CI log]

Regressions (🔴 2 failures)

Interaction Benchmarks · Samples: 5
Benchmarkchrome-webpackfirefox-webpack
loadNewAccount
[Sentry log · main/release]
🟡 [CI log]
🟡 load_new_account
🟡 [CI log]
🟡 load_new_account
confirmTx
[Sentry log · main/release]
🟡 [CI log]🟢 [CI log]
bridgeUserActions
[Sentry log · main/release]
🟡 [CI log]🟢 [CI log]

📈 Results compared to the previous 5 runs on main

  • loadNewAccount/load_new_account: +18%
  • loadNewAccount/total: +18%
  • confirmTx/longTaskTotalDuration: -13%
  • confirmTx/longTaskMaxDuration: +41%
  • confirmTx/tbt: -23%
  • bridgeUserActions/bridge_load_page: +43%
  • bridgeUserActions/bridge_load_asset_picker: +210%
  • bridgeUserActions/longTaskCount: +11%
  • bridgeUserActions/longTaskTotalDuration: -16%
  • bridgeUserActions/longTaskMaxDuration: -13%
  • bridgeUserActions/tbt: -25%
  • bridgeUserActions/total: +24%
  • bridgeUserActions/inp: +15%
  • loadNewAccount/load_new_account: +23%
  • loadNewAccount/total: +23%
  • loadNewAccount/inp: -24%
  • loadNewAccount/lcp: +1139%
  • confirmTx/confirm_tx: +15%
  • confirmTx/longTaskCount: -100%
  • confirmTx/longTaskTotalDuration: -100%
  • confirmTx/longTaskMaxDuration: -100%
  • confirmTx/tbt: -100%
  • confirmTx/total: +15%
  • confirmTx/inp: -17%
  • confirmTx/fcp: -41%
  • confirmTx/lcp: +1252%
  • bridgeUserActions/bridge_load_page: +185%
  • bridgeUserActions/bridge_load_asset_picker: +89%
  • bridgeUserActions/longTaskCount: -100%
  • bridgeUserActions/longTaskTotalDuration: -100%
  • bridgeUserActions/longTaskMaxDuration: -100%
  • bridgeUserActions/tbt: -100%
  • bridgeUserActions/total: +20%
  • bridgeUserActions/fcp: -47%
  • bridgeUserActions/lcp: +1237%

🌐 Core Web Vitals — 🟢 good · 🟡 needs improvement · 🔴 poor (web.dev thresholds)

  • 🟡 loadNewAccount/FCP: p75 1.9s
  • 🟡 confirmTx/FCP: p75 1.9s
  • 🟡 bridgeUserActions/FCP: p75 1.8s
  • 🟡 loadNewAccount/FCP: p75 1.9s
Startup Benchmarks · Samples: 100
Benchmarkchrome-webpackfirefox-webpack
startupStandardHome
[Sentry log · main/release]
🟢 [CI log]🟢 [CI log]
startupPowerUserHome
[Sentry log · main/release]
🟡 [CI log]

📈 Results compared to the previous 5 runs on main

  • startupStandardHome/firstReactRender: -99%
  • startupStandardHome/numNetworkReqs: -14%
  • startupStandardHome/domInteractive: -26%
  • startupStandardHome/firstReactRender: -98%
  • startupStandardHome/numNetworkReqs: -13%
  • startupStandardHome/fcp: -19%
  • startupPowerUserHome/load: +10%
  • startupPowerUserHome/domContentLoaded: +10%
  • startupPowerUserHome/domInteractive: +27%
  • startupPowerUserHome/backgroundConnect: +25%
  • startupPowerUserHome/firstReactRender: -99%
  • startupPowerUserHome/initialActions: +11%
  • startupPowerUserHome/loadScripts: +10%
  • startupPowerUserHome/setupStore: +270%
  • startupPowerUserHome/inp: +10%
  • startupPowerUserHome/fcp: +24%

🌐 Core Web Vitals — 🟢 good · 🟡 needs improvement · 🔴 poor (web.dev thresholds)

  • 🟡 startupPowerUserHome/INP: p75 208ms
  • 🟡 startupPowerUserHome/LCP: p75 3.1s
User Journey Benchmarks · Samples: 5 · mock API 🔴 2
Benchmarkchrome-webpackfirefox-webpack
onboardingImportWallet
[Sentry log · main/release]
🔴 [CI log]
🔴 total
🟢 [CI log]
onboardingNewWallet
[Sentry log · main/release]
🔴 [CI log]
🔴 total
🟢 [CI log]
assetDetails
[Sentry log · main/release]
🟢 [CI log]🟢 [CI log]
solanaAssetDetails
[Sentry log · main/release]
🟢 [CI log]🟢 [CI log]
importSrpHome
[Sentry log · main/release]
🟡 [CI log]🟡 [CI log]
sendTransactions
[Sentry log · main/release]
🟢 [CI log]🟡 [CI log]
swap
[Sentry log · main/release]
🟢 [CI log]🟡 [CI log]

📈 Results compared to the previous 5 runs on main

  • onboardingImportWallet/srpButtonToSrpForm: +19%
  • onboardingImportWallet/confirmSrpToPwForm: +12%
  • onboardingImportWallet/pwFormToMetricsScreen: +11%
  • onboardingImportWallet/metricsToWalletReadyScreen: +26%
  • onboardingImportWallet/doneButtonToHomeScreen: -92%
  • onboardingImportWallet/openAccountMenuToAccountListLoaded: -42%
  • onboardingImportWallet/longTaskCount: -71%
  • onboardingImportWallet/longTaskTotalDuration: -91%
  • onboardingImportWallet/longTaskMaxDuration: -88%
  • onboardingImportWallet/tbt: -97%
  • onboardingImportWallet/total: -79%
  • onboardingNewWallet/longTaskCount: -38%
  • onboardingNewWallet/longTaskTotalDuration: -56%
  • onboardingNewWallet/longTaskMaxDuration: -41%
  • onboardingNewWallet/tbt: -84%
  • solanaAssetDetails/assetClickToPriceChart: -14%
  • solanaAssetDetails/longTaskCount: -100%
  • solanaAssetDetails/longTaskTotalDuration: -100%
  • solanaAssetDetails/longTaskMaxDuration: -100%
  • solanaAssetDetails/tbt: -100%
  • solanaAssetDetails/total: -14%
  • solanaAssetDetails/inp: -29%
  • solanaAssetDetails/fcp: -12%
  • solanaAssetDetails/lcp: -20%
  • importSrpHome/homeAfterImportWithNewWallet: -11%
  • importSrpHome/longTaskCount: -30%
  • importSrpHome/longTaskTotalDuration: -29%
  • importSrpHome/longTaskMaxDuration: -27%
  • importSrpHome/tbt: -35%
  • importSrpHome/total: -11%
  • importSrpHome/inp: -46%
  • importSrpHome/fcp: +15%
  • importSrpHome/cls: +510%
  • sendTransactions/openSendPageFromHome: -31%
  • sendTransactions/selectTokenToSendFormLoaded: -27%
  • sendTransactions/reviewTransactionToConfirmationPage: -98%
  • sendTransactions/longTaskCount: -100%
  • sendTransactions/longTaskTotalDuration: -100%
  • sendTransactions/longTaskMaxDuration: -100%
  • sendTransactions/tbt: -100%
  • sendTransactions/total: -97%
  • sendTransactions/inp: -33%
  • sendTransactions/lcp: -68%
  • sendTransactions/cls: +171%
  • swap/openSwapPageFromHome: -31%
  • swap/fetchAndDisplaySwapQuotes: +89%
  • swap/longTaskCount: +33%
  • swap/tbt: -58%
  • swap/total: +86%
  • swap/inp: -21%
  • swap/fcp: -18%
  • swap/lcp: -75%
  • swap/cls: -92%

🌐 Core Web Vitals — 🟢 good · 🟡 needs improvement · 🔴 poor (web.dev thresholds)

  • 🟡 importSrpHome/FCP: p75 1.9s
  • 🟡 importSrpHome/FCP: p75 1.8s
  • 🔴 sendTransactions/INP: p75 720ms
  • 🟡 swap/FCP: p75 1.9s
Dapp Page Load Benchmarks · Samples: 100
Benchmarkchrome-webpack
dappPageLoad
[Sentry log · main/release]
🟢 [CI log]

📈 Results compared to the previous 5 runs on main

  • dappPageLoad/pageLoadTime: -58%
  • dappPageLoad/firstPaint: -46%
  • dappPageLoad/firstContentfulPaint: -46%
Bundle size diffs
  • background: 105 Bytes (0%)
  • ui: 322 Bytes (0%)
  • common: 0 Bytes (0%)
  • other: 0 Bytes (0%)
  • contentScripts: 0 Bytes (0%)
  • zip: 141 Bytes (0%)

@gantunesr
gantunesr deployed to pr-comment August 12, 2026 12:39 — with GitHub Actions Active
@gantunesr
gantunesr deployed to pr-comment August 12, 2026 13:01 — with GitHub Actions Active
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Ledger: If blind signing is disabled, Reconnect from the beginning workflow fails

1 participant