Skip to content

chore(selectors): remove unused selector exports - #47579

Merged
georgewrmarshall merged 1 commit into
mainfrom
cursor/remove-dead-code-selectors-20261103-a4dd
Nov 3, 2026
Merged

georgewrmarshall merged 1 commit into
mainfrom
cursor/remove-dead-code-selectors-20261103-a4dd

Conversation

@georgewrmarshall

@georgewrmarshall georgewrmarshall commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor

Description

Remove four unused selector exports. The account-type helpers they called (isBitcoinAccount, isSolanaAccount, isTronAccount, isStellarAccount, getIsControllerDeprecated) stay, because other code still imports those. Owner set: (none).

No user-facing behavior change.

path removed (file / symbol / class) why dead
ui/selectors/accounts.ts isNonEvmAccount unused export
ui/selectors/accounts.ts isSelectedInternalAccountSolana unused export
shared/lib/selectors/networks.ts getIsAllNetworksFilterEnabled unused export
ui/selectors/assets-unify-state/feature-flags.ts getIsTokenListControllerDeprecated unused export
ui/selectors/assets-unify-state/index.ts getIsTokenListControllerDeprecated re-export cascade from getIsTokenListControllerDeprecated

Docs/comments updated: none

Checks that passed: yarn lint:tsc, eslint on the touched files, yarn test:unit --coverage=false including ui/selectors/accounts.test.ts, ui/selectors/networks.test.ts, and ui/selectors/multichain/networks.test.ts (31 suites, 449 tests, 5 snapshots passed, no snapshot updates). No stylesheets changed.

Changelog

CHANGELOG entry: null

Related issues

Refs: proactive dead-code cleanup (extension counterpart of metamask-mobile#37948)

Manual testing steps

N/A — deletes unreachable code. There is no user-facing behavior to click through.

Screenshots/Recordings

N/A — no UI change

Before

N/A — no UI change

After

N/A — no UI change

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
Deletes unreachable exports only; no logic paths or user-facing behavior change.

Overview
Removes four unused Redux selector exports with no runtime or UI impact.

Accounts: drops isNonEvmAccount and isSelectedInternalAccountSolana from ui/selectors/accounts.ts. Per-chain helpers (isBitcoinAccount, isSolanaAccount, etc.) and selectEvmAddress are unchanged.

Networks: removes getIsAllNetworksFilterEnabled from shared/lib/selectors/networks.ts, which had built an “all chains enabled” map from network configurations.

Assets unify state: removes getIsTokenListControllerDeprecated and its barrel re-export; callers can still use getIsControllerDeprecated(state, 'TokenListController') where needed.

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

Co-authored-by: George Marshall <georgewrmarshall@users.noreply.github.com>
@github-actions github-actions Bot added the size-S label Nov 3, 2026
@georgewrmarshall georgewrmarshall added team-design-system All issues relating to design system in Extension and removed size-S labels Nov 3, 2026 — with Cursor
@georgewrmarshall georgewrmarshall self-assigned this Nov 3, 2026
@metamask-ci

metamask-ci Bot commented Nov 3, 2026

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

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

Metricschrome-webpackfirefox-webpack
loadNewAccount
[Sentry log · main/release]
🔴 load_new_account(p95) [CI log]🔴 load_new_account(p95) [CI log]

Regressions (🔴 2 failures)

Interaction Benchmarks · Samples: 5 🔴 2
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: +416%
  • ↑ loadNewAccount/total: +416%
  • ↓ loadNewAccount/inp: -24%
  • ↓ loadNewAccount/fcp: -12%
  • ↑ loadNewAccount/cls: +1181%
  • ↑ confirmTx/longTaskTotalDuration: +38%
  • ↑ confirmTx/longTaskMaxDuration: +81%
  • ↑ confirmTx/tbt: +66%
  • ↓ confirmTx/inp: -24%
  • ↓ confirmTx/fcp: -10%
  • ↑ bridgeUserActions/bridge_load_page: +39%
  • ↑ bridgeUserActions/bridge_load_asset_picker: +69%
  • ↑ bridgeUserActions/longTaskCount: +67%
  • ↑ bridgeUserActions/longTaskTotalDuration: +58%
  • ↑ bridgeUserActions/tbt: +43%
  • ↓ bridgeUserActions/lcp: -10%
  • ↑ bridgeUserActions/cls: +1181%
  • ↑ loadNewAccount/load_new_account: +418%
  • ↑ loadNewAccount/total: +418%
  • ↓ loadNewAccount/inp: -24%
  • ↓ loadNewAccount/fcp: -31%
  • ↑ loadNewAccount/lcp: +1259%
  • ↓ confirmTx/longTaskCount: -100%
  • ↓ confirmTx/longTaskTotalDuration: -100%
  • ↓ confirmTx/longTaskMaxDuration: -100%
  • ↓ confirmTx/tbt: -100%
  • ↓ confirmTx/inp: -24%
  • ↓ confirmTx/fcp: -34%
  • ↑ confirmTx/lcp: +1344%
  • ↑ bridgeUserActions/bridge_load_page: +316%
  • ↑ bridgeUserActions/bridge_load_asset_picker: +217%
  • ↑ bridgeUserActions/bridge_search_token: +34%
  • ↓ bridgeUserActions/longTaskCount: -100%
  • ↓ bridgeUserActions/longTaskTotalDuration: -100%
  • ↓ bridgeUserActions/longTaskMaxDuration: -100%
  • ↓ bridgeUserActions/tbt: -100%
  • ↑ bridgeUserActions/total: +65%
  • ↑ bridgeUserActions/inp: +62%
  • ↓ bridgeUserActions/fcp: -34%
  • ↑ bridgeUserActions/lcp: +1267%
Startup Benchmarks · Samples: 100
Benchmarkchrome-webpackfirefox-webpack
startupStandardHome
[Sentry log · main/release]
🟢 [CI log]🟡 [CI log]
🟡 loadScripts

📈 Results compared to the previous 5 runs on main

  • ↑ startupStandardHome/domInteractive: +19%
  • ↓ startupStandardHome/firstReactRender: -99%
  • ↓ startupStandardHome/initialActions: -33%
  • ↑ startupStandardHome/setupStore: +158%
  • ↑ startupStandardHome/numNetworkReqs: +10%
  • ↓ startupStandardHome/longTaskCount: -33%
  • ↑ startupStandardHome/domInteractive: +42%
  • ↓ startupStandardHome/firstReactRender: -98%
  • ↓ startupStandardHome/initialActions: -50%
  • ↑ startupStandardHome/setupStore: +137%
  • ↑ startupStandardHome/fcp: +44%
User Journey Benchmarks · Samples: 5 · mock API
Benchmarkchrome-webpackfirefox-webpack
onboardingImportWallet
[Sentry log · main/release]
🟢 [CI log]🟡 [CI log]
🟡 total
onboardingNewWallet
[Sentry log · main/release]
🟢 [CI log]🟢 [CI log]

📈 Results compared to the previous 5 runs on main

  • ↑ onboardingImportWallet/srpButtonToSrpForm: +43%
  • ↑ onboardingImportWallet/confirmSrpToPwForm: +73%
  • ↑ onboardingImportWallet/pwFormToMetricsScreen: +38%
  • ↑ onboardingImportWallet/metricsToWalletReadyScreen: +33%
  • ↓ onboardingImportWallet/doneButtonToHomeScreen: -94%
  • ↓ onboardingImportWallet/openAccountMenuToAccountListLoaded: -75%
  • ↓ onboardingImportWallet/longTaskCount: -100%
  • ↓ onboardingImportWallet/longTaskTotalDuration: -100%
  • ↓ onboardingImportWallet/longTaskMaxDuration: -100%
  • ↓ onboardingImportWallet/tbt: -100%
  • ↓ onboardingImportWallet/total: -89%
  • ↑ onboardingNewWallet/srpButtonToPwForm: +35%
  • ↑ onboardingNewWallet/createPwToRecoveryScreen: +23%
  • ↑ onboardingNewWallet/skipBackupToMetricsScreen: +22%
  • ↑ onboardingNewWallet/agreeButtonToOnboardingSuccess: +28%
  • ↓ onboardingNewWallet/doneButtonToAssetList: -75%
  • ↓ onboardingNewWallet/longTaskCount: -69%
  • ↓ onboardingNewWallet/longTaskTotalDuration: -76%
  • ↓ onboardingNewWallet/longTaskMaxDuration: -43%
  • ↓ onboardingNewWallet/tbt: -89%
  • ↓ onboardingNewWallet/total: -71%
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: -55%
  • ↓ dappPageLoad/firstPaint: -37%
  • ↓ dappPageLoad/firstContentfulPaint: -37%
Bundle Size Diffs
Status Bundle Total Diff Change
✅ background 15.26 MiB +54 Bytes 0.00%
✅ ui 19.33 MiB -33 Bytes 0.00%
✅ common 0 Bytes 0 Bytes 0.00%
✅ other 4.44 MiB 0 Bytes 0.00%
✅ content scripts 3.23 MiB 0 Bytes 0.00%
✅ unzipped 79.89 MiB +26 Bytes 0.00%
✅ zip 24.07 MiB +3 Bytes 0.00%

@sonarqubecloud

sonarqubecloud Bot commented Nov 3, 2026

Copy link
Copy Markdown

@vinnyhoward vinnyhoward left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

No correctness problems found

@georgewrmarshall
georgewrmarshall added this pull request to the merge queue Nov 3, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Nov 3, 2026
@georgewrmarshall
georgewrmarshall added this pull request to the merge queue Nov 3, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Nov 3, 2026
@georgewrmarshall
georgewrmarshall added this pull request to the merge queue Nov 3, 2026
Merged via the queue into main with commit 73f296f Nov 3, 2026
153 of 154 checks passed
@georgewrmarshall
georgewrmarshall deleted the cursor/remove-dead-code-selectors-20261103-a4dd branch November 3, 2026 20:35
@github-actions github-actions Bot locked and limited conversation to collaborators Nov 3, 2026
@metamaskbot metamaskbot added the release-13.57.0 Issue or pull request that will be included in release 13.57.0 label Nov 9, 2026
@gauthierpetetin

Copy link
Copy Markdown
Contributor

No release label on PR. Adding release label release-13.57.0 on PR, as PR was added to branch 13.57.0 when release was cut.

This branch had an error being deployed

1 failed and 1 inactive deployments
segment-schema — 187e884a Deployed Nov 3, 2026 by georgewrmarshall via propose #2546
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

release-13.57.0 Issue or pull request that will be included in release 13.57.0 team-design-system All issues relating to design system in Extension

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants