Skip to content

fix: limit smart account nav to entropy and simple accounts#40487

Merged
gantunesr merged 2 commits intomainfrom
gar/fix/smart-account-nav
Mar 2, 2026
Merged

fix: limit smart account nav to entropy and simple accounts#40487
gantunesr merged 2 commits intomainfrom
gar/fix/smart-account-nav

Conversation

@gantunesr
Copy link
Copy Markdown
Member

@gantunesr gantunesr commented Feb 27, 2026

Description

Update navigation condition to only allow "Entropy" and "Simple" accounts to access the Smart Account page.

Open in GitHub Codespaces

Changelog

CHANGELOG entry: limit smart account navigation to entropy and simple accounts

Related issues

Fixes: #40276
Fixes: https://consensyssoftware.atlassian.net/browse/MUL-1501

Manual testing steps

  1. Import a Ledger Account (or any hardware wallet account)
  2. Click Account details
  3. There should not be a option to navigate to the Smart Account page

Screenshots/Recordings

Before

Check #40276

After

Screen.Recording.2026-02-27.at.10.52.37.AM.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

Medium Risk
Changes route/UI gating for the Smart Account flow based on keyring type; a mismatch in keyring metadata or selectors could incorrectly hide/deny access for some accounts.

Overview
Limits Smart Account (EIP-7702) setup to supported keyrings only by introducing KEYRING_TYPES_SUPPORTING_7702 (hd, simple) and using it to gate the “Setup Smart Account” row on MultichainAccountDetailsPage.

Adds a guard in SmartAccountPage to redirect back (and render nothing) when the selected account’s keyring type does not support EIP-7702, preventing direct URL access for hardware/snap accounts; updates/extends unit tests and adjusts the Jest console baseline accordingly.

Written by Cursor Bugbot for commit 170440b. This will update automatically on new commits. Configure here.

@metamaskbotv2
Copy link
Copy Markdown
Contributor

metamaskbotv2 bot commented Feb 27, 2026

✨ Files requiring CODEOWNER review ✨

🔑 @MetaMask/accounts-engineers (4 files, +79 -17)
  • 📁 ui/
    • 📁 pages/
      • 📁 multichain-accounts/
        • 📁 multichain-account-details-page/
          • 📄 multichain-account-details-page.test.tsx +12 -0
          • 📄 multichain-account-details-page.tsx +23 -15
        • 📁 smart-account-page/
          • 📄 smart-account-page.test.tsx +20 -1
          • 📄 smart-account-page.tsx +24 -1

@gantunesr gantunesr marked this pull request as ready for review February 27, 2026 14:02
@gantunesr gantunesr requested a review from a team as a code owner February 27, 2026 14:02
@metamaskbotv2
Copy link
Copy Markdown
Contributor

metamaskbotv2 bot commented Feb 27, 2026

Builds ready [193e922]
⚡ Performance Benchmarks
👆 Interaction Benchmarks
BenchmarkMetricMean (ms)Min (ms)Max (ms)Std Dev (ms)P75 (ms)P95 (ms)
Load New Accountload_new_account28827130413296304
total28827130413296304
Confirm Txconfirm_tx608160806084260846084
total608160806084260846084
Bridge User Actionsbridge_load_page2452392505250250
bridge_load_asset_picker22118025829249258
bridge_search_token72570874615740746
total1197113812544412401254
🔌 Startup Benchmarks
BenchmarkMetricMean (ms)Min (ms)Max (ms)Std Dev (ms)P75 (ms)P95 (ms)
Standard HomeuiStartup14151187216514114561618
load1188987182912512431365
domContentLoaded1179978178412012371344
domInteractive2816101182570
firstPaint236651812279219463
backgroundConnect20918126117214243
firstReactRender18114251929
initialActions207125
loadScripts989785156811810471158
setupStore1365061525
numNetworkReqs312299212290
Power User HomeuiStartup2382145010328161421124602
load11861034169114412201540
domContentLoaded11691025160513812051524
domInteractive39202212936109
firstPaint1767448879239307
backgroundConnect742253819312723312659
firstReactRender23164262537
initialActions105112
loadScripts96081914041379941309
setupStore1678891827
numNetworkReqs72381492787126
🧭 User Journey Benchmarks
BenchmarkMetricMean (ms)Min (ms)Max (ms)Std Dev (ms)P75 (ms)P95 (ms)
Onboarding Import WalletimportWalletToSocialScreen2202182211221221
srpButtonToSrpForm94929619596
confirmSrpToPwForm22222202222
pwFormToMetricsScreen16151601616
metricsToWalletReadyScreen17161811818
doneButtonToHomeScreen1167862156325812781563
openAccountMenuToAccountListLoaded74017075783028576387830
total89378805910210590079102
Onboarding New WalletcreateWalletToSocialScreen2232222241223224
srpButtonToPwForm1131121161113116
createPwToRecoveryScreen999099
skipBackupToMetricsScreen37363703737
agreeButtonToOnboardingSuccess17171801718
doneButtonToAssetList898583131229011701312
total1302980171729815951717
Asset DetailsassetClickToPriceChart38363913939
total38363913939
Solana Asset DetailsassetClickToPriceChart58566125961
total58566125961
Import Srp HomeloginToHomeScreen1954192419752119721975
openAccountMenuAfterLogin48445554955
homeAfterImportWithNewWallet2630252927398126732739
total46254272497023147544970
Send TransactionsopenSendPageFromHome25173793637
selectTokenToSendFormLoaded20182222022
reviewTransactionToConfirmationPage8568458709857870
total89988292516897925
SwapopenSwapPageFromHome1161031269119126
fetchAndDisplaySwapQuotes4586456746061645984606
total4686462547254247254725
🌐 Dapp Page Load Benchmarks

Current Commit: 193e922 | Date: 2/27/2026

📄 Localhost MetaMask Test Dapp

Samples: 100

Summary

  • pageLoadTime-> current mean value: 1.05s (±40ms) 🟡 | historical mean value: 1.04s ⬆️ (historical data)
  • domContentLoaded-> current mean value: 737ms (±37ms) 🟢 | historical mean value: 732ms ⬆️ (historical data)
  • firstContentfulPaint-> current mean value: 82ms (±13ms) 🟢 | historical mean value: 83ms ⬇️ (historical data)

📈 Detailed Results

Metric Mean Std Dev Min Max P95 P99
pageLoadTime 1.05s 40ms 1.02s 1.34s 1.09s 1.34s
domContentLoaded 737ms 37ms 712ms 1.01s 772ms 1.01s
firstPaint 82ms 13ms 68ms 200ms 88ms 200ms
firstContentfulPaint 82ms 13ms 68ms 200ms 88ms 200ms
largestContentfulPaint 0ms 0ms 0ms 0ms 0ms 0ms
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 58 Bytes (0%)
  • ui: 1.49 KiB (0.02%)
  • common: 21 Bytes (0%)

@sonarqubecloud
Copy link
Copy Markdown

@metamaskbotv2
Copy link
Copy Markdown
Contributor

metamaskbotv2 bot commented Feb 27, 2026

Builds ready [170440b]
⚡ Performance Benchmarks
👆 Interaction Benchmarks
BenchmarkMetricMean (ms)Min (ms)Max (ms)Std Dev (ms)P75 (ms)P95 (ms)
Load New Accountload_new_account2682612786269278
total2682612786269278
Confirm Txconfirm_tx603960296047860456047
total603960296047860456047
Bridge User Actionsbridge_load_page25523028922262289
bridge_load_asset_picker19713127766277277
bridge_search_token74270381042770810
total1194109612798112541279
🔌 Startup Benchmarks
BenchmarkMetricMean (ms)Min (ms)Max (ms)Std Dev (ms)P75 (ms)P95 (ms)
Standard HomeuiStartup14281210194810914621617
load11971006164910012301380
domContentLoaded1189100016409712231342
domInteractive2817134212582
firstPaint165721296139221293
backgroundConnect21219226515218247
firstReactRender20124662132
initialActions108224
loadScripts99481014349710241151
setupStore1463251724
numNetworkReqs312289192284
Power User HomeuiStartup3290152110767203741697304
load12671064180714213011616
domContentLoaded12521049179714112801607
domInteractive39202623435108
firstPaint2148957293284343
backgroundConnect13972698996177720524266
firstReactRender25184952631
initialActions109114
loadScripts1033849158514010531389
setupStore1666981829
numNetworkReqs83401482396131
🧭 User Journey Benchmarks
BenchmarkMetricMean (ms)Min (ms)Max (ms)Std Dev (ms)P75 (ms)P95 (ms)
Onboarding Import WalletimportWalletToSocialScreen2192182191219219
srpButtonToSrpForm95939829598
confirmSrpToPwForm22212202222
pwFormToMetricsScreen15151501515
metricsToWalletReadyScreen16151811618
doneButtonToHomeScreen723603865118813865
openAccountMenuToAccountListLoaded78207695803113478408031
total89098682902812790239028
Onboarding New WalletcreateWalletToSocialScreen2202172232220223
srpButtonToPwForm1061061070107107
createPwToRecoveryScreen889089
skipBackupToMetricsScreen35353503535
agreeButtonToOnboardingSuccess17161701717
doneButtonToAssetList854560127032012201270
total1241945165631916041656
Asset DetailsassetClickToPriceChart604092207492
total604092207492
Solana Asset DetailsassetClickToPriceChart52475735357
total52475735357
Import Srp HomeloginToHomeScreen2072196722349321042234
openAccountMenuAfterLogin40394114141
homeAfterImportWithNewWallet22892113256116623852561
total4346427343914843874391
Send TransactionsopenSendPageFromHome30194093740
selectTokenToSendFormLoaded27204072940
reviewTransactionToConfirmationPage86585388212870882
total92290994514924945
SwapopenSwapPageFromHome12810615016133150
fetchAndDisplaySwapQuotes6294626563092063096309
total6423637264894664426489
🌐 Dapp Page Load Benchmarks

Current Commit: 170440b | Date: 2/27/2026

📄 Localhost MetaMask Test Dapp

Samples: 100

Summary

  • pageLoadTime-> current mean value: 1.05s (±145ms) 🟡 | historical mean value: 1.04s ⬆️ (historical data)
  • domContentLoaded-> current mean value: 740ms (±161ms) 🟢 | historical mean value: 729ms ⬆️ (historical data)
  • firstContentfulPaint-> current mean value: 101ms (±231ms) 🟢 | historical mean value: 82ms ⬆️ (historical data)

📈 Detailed Results

Metric Mean Std Dev Min Max P95 P99
pageLoadTime 1.05s 145ms 1.01s 2.47s 1.07s 2.47s
domContentLoaded 740ms 161ms 708ms 2.33s 752ms 2.33s
firstPaint 101ms 231ms 60ms 2.40s 88ms 2.40s
firstContentfulPaint 101ms 231ms 60ms 2.40s 88ms 2.40s
largestContentfulPaint 0ms 0ms 0ms 0ms 0ms 0ms
Bundle size diffs [🚀 Bundle size reduced!]
  • background: 58 Bytes (0%)
  • ui: -13.87 KiB (-0.17%)
  • common: -635 Bytes (-0.01%)

@gantunesr gantunesr added this pull request to the merge queue Mar 2, 2026
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Mar 2, 2026
@gantunesr gantunesr added this pull request to the merge queue Mar 2, 2026
Merged via the queue into main with commit ed5beef Mar 2, 2026
184 checks passed
@gantunesr gantunesr deleted the gar/fix/smart-account-nav branch March 2, 2026 15:50
@github-actions github-actions bot locked and limited conversation to collaborators Mar 2, 2026
@metamaskbot metamaskbot added the release-13.22.0 Issue or pull request that will be included in release 13.22.0 label Mar 2, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

release-13.22.0 Issue or pull request that will be included in release 13.22.0 size-M team-accounts-framework Accounts team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: EIP7702 - I'm able to click on Setup Smart Account for Hardware Wallet accounts but then land into empty page

4 participants