Skip to content

chore(activity): remove unused hook - #47847

Merged
n3ps merged 1 commit into
mainfrom
n3ps/remove-use-prefetch-transactions-1340
Nov 11, 2026
Merged

n3ps merged 1 commit into
mainfrom
n3ps/remove-use-prefetch-transactions-1340

Conversation

@n3ps

@n3ps n3ps commented Nov 11, 2026 •

Copy link
Copy Markdown
Contributor

Description

Remove unused prefetch hook

Changelog

CHANGELOG entry: null

Related issues

Fixes:

Manual testing steps

  1. Go to this page...

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.

Note

Low Risk
Dead-code removal only; no runtime behavior change for active transaction queries.

Overview
This PR removes the exported usePrefetchTransactions hook from useTransactionsQuery.ts, along with its supporting imports (useQueryClient and selectEnabledNetworksAsCaipChainIds). That hook opportunistically prefetched multi-account transaction pages into the React Query cache when external services were enabled and no data was already loading.

useTransactionsQuery is unchanged aside from this deletion; transaction loading behavior for the activity UI stays the same, with no remaining references to the prefetch helper in the codebase.

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

Co-authored-by: Francis Nepomuceno <n3ps@users.noreply.github.com>
@n3ps
n3ps requested a review from a team as a code owner November 11, 2026 17:20
@metamask-ci metamask-ci Bot added the team-core-extension-ux Core Extension UX team label Nov 11, 2026
@n3ps n3ps added team-extension-ux and removed team-core-extension-ux Core Extension UX team labels Nov 11, 2026
@metamask-ci

metamask-ci Bot commented Nov 11, 2026

Copy link
Copy Markdown
Contributor

✨ Files requiring CODEOWNER review ✨

👨‍🔧 @MetaMask/core-extension-ux (1 files, +1 -61)
  • 📁 ui/
    • 📁 pages/
      • 📁 activity/
        • 📄 useTransactionsQuery.ts +1 -61

@n3ps
n3ps enabled auto-merge November 11, 2026 17:20
@github-project-automation github-project-automation Bot moved this to Needs dev review in PR review queue Nov 11, 2026
@metamask-ci

metamask-ci Bot commented Nov 11, 2026

Copy link
Copy Markdown
Contributor
Builds ready [db477a8]
⚡ Performance Benchmarks (Total: 🟢 8 pass · 🟡 2 warn · 🔴 3 fail)

Baseline (latest main): f693520 | Date: 11/3/2026 | Pipeline: 43067145533 | Baseline logs

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

Regressions (🔴 3 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: +181%
  • ↑ loadNewAccount/total: +181%
  • ↓ loadNewAccount/inp: -40%
  • ↓ loadNewAccount/fcp: -18%
  • ↑ loadNewAccount/lcp: +707%
  • ↑ loadNewAccount/cls: +297%
  • ↑ confirmTx/longTaskMaxDuration: +17%
  • ↑ confirmTx/tbt: +12%
  • ↓ confirmTx/inp: -44%
  • ↓ confirmTx/fcp: -21%
  • ↑ confirmTx/lcp: +690%
  • ↓ confirmTx/cls: -14%
  • ↑ bridgeUserActions/bridge_load_page: +41%
  • ↓ bridgeUserActions/longTaskTotalDuration: -20%
  • ↓ bridgeUserActions/longTaskMaxDuration: -24%
  • ↓ bridgeUserActions/tbt: -24%
  • ↓ bridgeUserActions/inp: -12%
  • ↓ bridgeUserActions/fcp: -18%
  • ↑ bridgeUserActions/lcp: +713%
  • ↑ bridgeUserActions/cls: +387%
  • ↑ loadNewAccount/load_new_account: +181%
  • ↑ loadNewAccount/total: +181%
  • ↓ loadNewAccount/inp: -18%
  • ↓ loadNewAccount/fcp: -50%
  • ↑ loadNewAccount/lcp: +1058%
  • ↓ confirmTx/longTaskCount: -100%
  • ↓ confirmTx/longTaskTotalDuration: -100%
  • ↓ confirmTx/longTaskMaxDuration: -100%
  • ↓ confirmTx/tbt: -100%
  • ↓ confirmTx/inp: -29%
  • ↓ confirmTx/fcp: -58%
  • ↑ confirmTx/lcp: +1036%
  • ↑ bridgeUserActions/bridge_load_page: +82%
  • ↑ bridgeUserActions/bridge_load_asset_picker: +78%
  • ↓ bridgeUserActions/longTaskCount: -100%
  • ↓ bridgeUserActions/longTaskTotalDuration: -100%
  • ↓ bridgeUserActions/longTaskMaxDuration: -100%
  • ↓ bridgeUserActions/tbt: -100%
  • ↑ bridgeUserActions/total: +14%
  • ↑ bridgeUserActions/inp: +25%
  • ↓ bridgeUserActions/fcp: -50%
  • ↑ bridgeUserActions/lcp: +1047%
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/uiStartup: +22%
  • ↑ startupStandardHome/load: +43%
  • ↑ startupStandardHome/domContentLoaded: +44%
  • ↓ startupStandardHome/firstPaint: -43%
  • ↓ startupStandardHome/backgroundConnect: -24%
  • ↓ startupStandardHome/firstReactRender: -98%
  • ↓ startupStandardHome/initialActions: -64%
  • ↑ startupStandardHome/loadScripts: +43%
  • ↑ startupStandardHome/setupStore: +56%
  • ↑ startupStandardHome/longTaskTotalDuration: +39%
  • ↑ startupStandardHome/longTaskMaxDuration: +60%
  • ↑ startupStandardHome/tbt: +47%
  • ↓ startupStandardHome/inp: -24%
  • ↑ startupStandardHome/fcp: +36%
  • ↑ startupStandardHome/lcp: +513%
  • ↓ startupStandardHome/cls: -72%
  • ↓ startupStandardHome/domInteractive: -19%
  • ↑ startupStandardHome/backgroundConnect: +12%
  • ↓ startupStandardHome/firstReactRender: -98%
  • ↓ startupStandardHome/initialActions: -50%
User Journey Benchmarks · Samples: 5 · mock API 🔴 1
Benchmarkchrome-webpackfirefox-webpack
onboardingImportWallet
[Sentry log · main/release]
🟢 [CI log]🟡 [CI log]
🟡 total
onboardingNewWallet
[Sentry log · main/release]
🟢 [CI log]🔴 [CI log]
🔴 total

📈 Results compared to the previous 5 runs on main

  • ↓ onboardingImportWallet/srpButtonToSrpForm: -28%
  • ↓ onboardingImportWallet/confirmSrpToPwForm: -21%
  • ↓ onboardingImportWallet/metricsToWalletReadyScreen: -36%
  • ↓ onboardingImportWallet/doneButtonToHomeScreen: -92%
  • ↓ onboardingImportWallet/openAccountMenuToAccountListLoaded: -74%
  • ↓ onboardingImportWallet/longTaskCount: -100%
  • ↓ onboardingImportWallet/longTaskTotalDuration: -100%
  • ↓ onboardingImportWallet/longTaskMaxDuration: -100%
  • ↓ onboardingImportWallet/tbt: -100%
  • ↓ onboardingImportWallet/total: -86%
  • ↑ onboardingNewWallet/createPwToRecoveryScreen: +31%
  • ↑ onboardingNewWallet/skipBackupToMetricsScreen: +15%
  • ↓ onboardingNewWallet/doneButtonToAssetList: -70%
  • ↓ onboardingNewWallet/longTaskCount: -100%
  • ↓ onboardingNewWallet/longTaskTotalDuration: -100%
  • ↓ onboardingNewWallet/longTaskMaxDuration: -100%
  • ↓ onboardingNewWallet/tbt: -100%
  • ↓ onboardingNewWallet/total: -66%
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: -49%
  • ↓ dappPageLoad/firstPaint: -28%
  • ↓ dappPageLoad/firstContentfulPaint: -28%
Bundle Size Diffs
Status Bundle Total Diff Change
✅ background 15.22 MiB +115 Bytes 0.00%
✅ ui 19.5 MiB -22 Bytes 0.00%
✅ common 0 Bytes 0 Bytes 0.00%
✅ other 4.46 MiB 0 Bytes 0.00%
✅ content scripts 3.22 MiB 0 Bytes 0.00%
✅ unzipped 79.93 MiB +98 Bytes 0.00%
✅ zip 24.01 MiB +52 Bytes 0.00%

@sonarqubecloud

Copy link
Copy Markdown

@n3ps n3ps added the retry-ci Tells GitHub Actions to retry failed jobs, label removed automatically before the retry label Nov 11, 2026
@github-project-automation github-project-automation Bot moved this from Needs dev review to Review finalised - Ready to be merged in PR review queue Nov 11, 2026
@n3ps
n3ps added this pull request to the merge queue Nov 11, 2026
Merged via the queue into main with commit 6914107 Nov 11, 2026
272 of 274 checks passed
@n3ps
n3ps deleted the n3ps/remove-use-prefetch-transactions-1340 branch November 11, 2026 19:17
@github-project-automation github-project-automation Bot moved this from Review finalised - Ready to be merged to Merged, Closed or Archived in PR review queue Nov 11, 2026
@github-actions github-actions Bot removed the retry-ci Tells GitHub Actions to retry failed jobs, label removed automatically before the retry label Nov 11, 2026
@github-actions github-actions Bot locked and limited conversation to collaborators Nov 11, 2026
@metamaskbot metamaskbot added the release-13.58.0 Issue or pull request that will be included in release 13.58.0 label Nov 16, 2026
@gauthierpetetin

Copy link
Copy Markdown
Contributor

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

This branch was previously deployed

1 inactive deployment
pr-comment — db477a87 Deployed Nov 11, 2026 by n3ps via Publish prerelease / Publish prerelease #174146
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

release-13.58.0 Issue or pull request that will be included in release 13.58.0 size-S team-extension-ux

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

6 participants