Skip to content

Comments

chore: bump @metamask/core-backend and set up ApiPlatformClient#40262

Merged
n3ps merged 7 commits intomainfrom
n3ps/api-client
Feb 23, 2026
Merged

chore: bump @metamask/core-backend and set up ApiPlatformClient#40262
n3ps merged 7 commits intomainfrom
n3ps/api-client

Conversation

@n3ps
Copy link
Contributor

@n3ps n3ps commented Feb 20, 2026

Description

Start using the typed getV4MultiAccountTransactionsQueryOptions from core-backend

Part 1 of moving into using a shared query configuration

Part 2 needs an update on core-backend to handle RQ v4/v5 differences

Open in GitHub Codespaces

Changelog

CHANGELOG entry: chore: bump @metamask/core-backend and set up ApiPlatformClient

Related issues

Fixes: N/A

Manual testing steps

  1. Activity list renders as expected

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

Medium Risk
Changes the transaction activity data-fetching path and upgrades a core dependency, which could affect query keys/pagination and auth token handling despite being largely a refactor.

Overview
Upgrades @metamask/core-backend to ^6.0.0 and shifts multiaccount transaction fetching to use createApiPlatformClient + the typed getV4MultiAccountTransactionsQueryOptions rather than a hand-rolled fetch wrapper.

This removes the shared shared/lib/api-client.ts and shared/lib/multichain/queries.ts, adds UI-scoped ui/helpers/api-client.ts and ui/helpers/queries.ts, and updates the Activity v2 hooks to build CAIP-formatted account addresses and prefetch via the new query options.

Updates assets-controller-init to type/cast its cached API client as AssetsControllerOptions['queryApiClient'], adjusts integration test mocks to return a token for getBearerToken, and tightens LavaMoat policies to attribute core-backend access through @metamask/assets-controller (plus MV3 allowances for @metamask/core-backend).

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

@n3ps n3ps added the team-core-extension-ux Core Extension UX team label Feb 20, 2026
@github-actions
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.

};

export const queries = {
transactions: (
Copy link
Contributor Author

@n3ps n3ps Feb 20, 2026

Choose a reason for hiding this comment

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

  1. Moved file

Copy link
Contributor

Choose a reason for hiding this comment

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

I wonder if we should have a dedicated directory for TQ primitives outside of ui/helpers/ e.g. ui/queries/

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Next PR! Have follow ups to this file too

@socket-security
Copy link

socket-security bot commented Feb 20, 2026

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Added@​metamask/​core-backend@​6.0.09910010095100

View full report

queryKey,
queryFn: ({ pageParam, signal }) => {
const { queryFn: fetchPage } =
apiClient.accounts.getV4MultiAccountTransactionsQueryOptions(
Copy link
Contributor Author

@n3ps n3ps Feb 20, 2026

Choose a reason for hiding this comment

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

  1. Replaced with apiClient which abstracts the API details

@metamaskbotv2
Copy link
Contributor

metamaskbotv2 bot commented Feb 20, 2026

✨ Files requiring CODEOWNER review ✨

👨‍🔧 @MetaMask/core-extension-ux (1 files, +28 -32)
  • 📁 ui/
    • 📁 components/
      • 📁 multichain/
        • 📁 activity-v2/
          • 📄 hooks.ts +28 -32

📜 @MetaMask/policy-reviewers (12 files, +168 -8)
  • 📁 lavamoat/
    • 📁 browserify/
      • 📁 beta/
        • 📄 policy.json +16 -1
      • 📁 experimental/
        • 📄 policy.json +16 -1
      • 📁 flask/
        • 📄 policy.json +16 -1
      • 📁 main/
        • 📄 policy.json +16 -1
    • 📁 webpack/
      • 📁 mv2/
        • 📁 beta/
          • 📄 policy.json +1 -1
        • 📁 experimental/
          • 📄 policy.json +1 -1
        • 📁 flask/
          • 📄 policy.json +1 -1
        • 📁 main/
          • 📄 policy.json +1 -1
      • 📁 mv3/
        • 📁 beta/
          • 📄 policy.json +25 -0
        • 📁 experimental/
          • 📄 policy.json +25 -0
        • 📁 flask/
          • 📄 policy.json +25 -0
        • 📁 main/
          • 📄 policy.json +25 -0

Tip

Follow the policy review process outlined in the LavaMoat Policy Review Process doc before expecting an approval from Policy Reviewers.

@metamaskbotv2
Copy link
Contributor

metamaskbotv2 bot commented Feb 20, 2026

Builds ready [ce4be31]
UI Startup Metrics (1290 ± 89 ms)
PlatformBuildTypePageMetricMean (ms)Min (ms)Max (ms)Std Dev (ms)P 75 (ms)P 95 (ms)
ChromeBrowserifyStandard HomeuiStartup1290111315238913221479
load109992213248111251245
domContentLoaded109291713018111191234
domInteractive2715117202482
firstPaint219591242208219315
backgroundConnect19518024512198221
firstReactRender18124051927
initialActions106112
loadScripts9147381112809361062
setupStore1263251419
numNetworkReqs312299212390
BrowserifyPower User HomeuiStartup16781350222816717222035
load11241010170414111141495
domContentLoaded11111002169513911001463
domInteractive3318150213490
firstPaint1747153983236316
backgroundConnect28225351834287314
firstReactRender23154972536
initialActions103112
loadScripts91080514851358971254
setupStore1766091839
numNetworkReqs59381582655126
WebpackStandard HomeuiStartup8627011162919001046
load72761495984782873
domContentLoaded72261095383778864
domInteractive2816112192480
firstPaint1116230256130242
backgroundConnect28197193146
firstReactRender19123762232
initialActions105112
loadScripts71960894582775861
setupStore1153041318
numNetworkReqs3122100212588
WebpackPower User HomeuiStartup1188863176916712621473
load70261711251076951005
domContentLoaded6936121118107688987
domInteractive35161442835115
firstPaint1336040773154283
backgroundConnect16112642149160248
firstReactRender22176152330
initialActions109111
loadScripts6906101109105686980
setupStore1253841317
numNetworkReqs1073525450136228
FirefoxBrowserifyStandard HomeuiStartup17311473261321817282196
load14431226229515114631799
domContentLoaded14411225229415114631799
domInteractive963491498123204
firstPaint------
backgroundConnect71308888765110
firstReactRender14122321518
initialActions103112
loadScripts14121198226914414351660
setupStore178118141743
numNetworkReqs321997202791
BrowserifyPower User HomeuiStartup27762007427343028613488
load15891245234828417722166
domContentLoaded15881245234828417712160
domInteractive12735844126123425
firstPaint------
backgroundConnect281110897244266864
firstReactRender18146161823
initialActions217122
loadScripts15531231232727416802108
setupStore1157754163120491
numNetworkReqs59271393670136
WebpackStandard HomeuiStartup17271431331033217122136
load14551208294029414681706
domContentLoaded14551208294029414681705
domInteractive792724949108166
firstPaint------
backgroundConnect69263044776176
firstReactRender16126461625
initialActions103112
loadScripts14281190290929114361659
setupStore188133211548
numNetworkReqs312096182776
WebpackPower User HomeuiStartup27701994429745028863708
load16161284247831817672360
domContentLoaded16161284247831817632359
domInteractive14232778164114552
firstPaint------
backgroundConnect282111988223298901
firstReactRender22166882331
initialActions203122
loadScripts15831260245630917322301
setupStore2058792257323739
numNetworkReqs56251633477123
📊 Page Load Benchmark Results

Current Commit: ce4be31 | Date: 2/20/2026

📄 Localhost MetaMask Test Dapp

Samples: 100

Summary

  • pageLoadTime-> current mean value: 1.04s (±39ms) 🟡 | historical mean value: 1.06s ⬇️ (historical data)
  • domContentLoaded-> current mean value: 726ms (±36ms) 🟢 | historical mean value: 742ms ⬇️ (historical data)
  • firstContentfulPaint-> current mean value: 78ms (±13ms) 🟢 | historical mean value: 81ms ⬇️ (historical data)

📈 Detailed Results

Metric Mean Std Dev Min Max P95 P99
pageLoadTime 1.04s 39ms 1.02s 1.33s 1.06s 1.33s
domContentLoaded 726ms 36ms 703ms 993ms 746ms 993ms
firstPaint 78ms 13ms 64ms 188ms 88ms 188ms
firstContentfulPaint 78ms 13ms 64ms 188ms 88ms 188ms
largestContentfulPaint 0ms 0ms 0ms 0ms 0ms 0ms
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 52.28 KiB (1.21%)
  • ui: -548 Bytes (-0.01%)
  • common: 8.17 KiB (0.07%)

"@metamask/contract-metadata": "^2.5.0",
"@metamask/controller-utils": "^11.18.0",
"@metamask/core-backend": "^5.0.0",
"@metamask/core-backend": "^6.0.0",
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Main point of interest

* Cached API client instance.
*/
let apiClient: ApiPlatformClient | null = null;
let apiClient: AssetsControllerOptions['queryApiClient'] | null = null;
Copy link
Contributor Author

@n3ps n3ps Feb 20, 2026

Choose a reason for hiding this comment

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

Interim since asset-controller needs a version bump of core-backend

@n3ps n3ps marked this pull request as ready for review February 20, 2026 14:49
@n3ps n3ps requested review from a team as code owners February 20, 2026 14:49
MajorLift
MajorLift previously approved these changes Feb 20, 2026
Copy link
Contributor

@MajorLift MajorLift left a comment

Choose a reason for hiding this comment

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

Approving for @MetaMask/policy-reviewers

Comment on lines +1863 to +1874
"@metamask/core-backend>@tanstack/query-core": {
"globals": {
"AbortController": true,
"addEventListener": true,
"clearInterval": true,
"clearTimeout": true,
"console.error": true,
"document": true,
"removeEventListener": true,
"setInterval": true,
"setTimeout": true
},
Copy link
Contributor

Choose a reason for hiding this comment

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

Overrides for @tanstack/query-core v5 already applied in main for all builds (search results):

    "@metamask/core-backend>@tanstack/query-core": {
      "globals": {
        "document": false,
        "document.visibilityState": true,
        "addEventListener": false
      }
    },

https://github.com/MetaMask/metamask-extension/blob/main/lavamoat/webpack/mv3/main/policy-override.json#L234-L240

Comment on lines +742 to +746
"@metamask/core-backend": {
"globals": {
"URL": true,
"fetch": true
},
Copy link
Contributor

Choose a reason for hiding this comment

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

Safe:

  • Internal packages.
  • Required for key functionality as data service.

Comment on lines +1123 to +1130
"@metamask/assets-controller>@metamask/core-backend": {
"globals": {
"URL": true,
"WebSocket": true,
"clearTimeout": true,
"fetch": true,
"setTimeout": true
},
Copy link
Contributor

Choose a reason for hiding this comment

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

Safe:

  • Internal packages.
  • Required for key functionality as data service.

@metamaskbotv2
Copy link
Contributor

metamaskbotv2 bot commented Feb 20, 2026

Builds ready [8265865]
⚡ Performance Benchmarks (1603 ± 126 ms)
👆 Interaction Benchmarks
ActionMetricMean (ms)Std Dev (ms)P75 (ms)P95 (ms)
Load New Accountload_new_account29030323327
total29030323327
Confirm Txconfirm_tx60352660496078
total60352660496078
Bridge User Actionsbridge_load_page22627235269
bridge_load_asset_picker18238205226
bridge_search_token7002700702
total1096410981100
🔌 Startup Benchmarks
BuildMetricMean (ms)Min (ms)Max (ms)Std Dev (ms)P 75 (ms)P 95 (ms)
Chrome Browserify Startup Standard HomeuiStartup16031265208212616491804
load13501040183312514101551
domContentLoaded13411035182512213971523
domInteractive34181962728101
firstPaint251731565300242453
backgroundConnect23620844726241269
firstReactRender21134362237
initialActions105113
loadScripts1127833159812211831314
setupStore1575071826
numNetworkReqs312296202286
Chrome Browserify Startup Power User HomeuiStartup3064142610543201236677859
load11991030153210812441446
domContentLoaded11811023148010112271419
domInteractive3219110153553
firstPaint1758640982252315
backgroundConnect9652607718120011773202
firstReactRender2516113122638
initialActions104112
loadScripts97883512829910181214
setupStore1564361727
numNetworkReqs79341462393117
Chrome Webpack Startup Standard HomeuiStartup8636941119969361065
load741613101592804885
domContentLoaded735609100791799879
domInteractive2815119212285
firstPaint1245940072147315
backgroundConnect26185772837
firstReactRender18123762030
initialActions103112
loadScripts733607100591797877
setupStore1163041118
numNetworkReqs312295202588
Chrome Webpack Startup Power User HomeuiStartup1265900274129213421706
load7296331152101732970
domContentLoaded7186261143102718949
domInteractive3819209303692
firstPaint13968998109147255
backgroundConnect1921301739203160314
firstReactRender22164242330
initialActions104111
loadScripts715624113499716939
setupStore1143151318
numNetworkReqs1355123537158205
Firefox Browserify Startup Standard HomeuiStartup16151369247120916312015
load13671149217818513861647
domContentLoaded13661148217818613861646
domInteractive773120044107152
firstPaint------
backgroundConnect60271822761128
firstReactRender13112721415
initialActions102012
loadScripts13381126214817713641572
setupStore187154231543
numNetworkReqs312094192785
Firefox Browserify Startup Power User HomeuiStartup298221228674103530273590
load17761261720695416722176
domContentLoaded17751261720695416722175
domInteractive16137562126181471
firstPaint------
backgroundConnect44712313923277101061
firstReactRender19147171822
initialActions206122
loadScripts17301234714495216002126
setupStore10811705142104466
numNetworkReqs843019937101168
Firefox Webpack Startup Standard HomeuiStartup18251489350129518502130
load15371304305727115501754
domContentLoaded15361304305727115491754
domInteractive127311523198133209
firstPaint------
backgroundConnect69322213675154
firstReactRender17142941725
initialActions103122
loadScripts15091286294726515231725
setupStore257192291961
numNetworkReqs312095172779
Firefox Webpack Startup Power User HomeuiStartup29462050975982631253602
load17221366808672416772353
domContentLoaded17211366808672416762353
domInteractive192581121224154775
firstPaint------
backgroundConnect451821316299649998
firstReactRender24168092633
initialActions203123
loadScripts16761344803871116422280
setupStore16812983218197643
numNetworkReqs79362224583206
🧭 User Journey Benchmarks
BenchmarkMetricMean (ms)Std Dev (ms)P75 (ms)P95 (ms)
Onboarding Import WalletimportWalletToSocialScreen2180218218
srpButtonToSrpForm9319494
confirmSrpToPwForm2202222
pwFormToMetricsScreen1601616
metricsToWalletReadyScreen1701717
doneButtonToHomeScreen98329112761374
openAccountMenuToAccountListLoaded744743478477868
total880116488899033
Onboarding New WalletcreateWalletToSocialScreen2171218218
srpButtonToPwForm1031103105
createPwToRecoveryScreen8088
skipBackupToMetricsScreen3403434
agreeButtonToOnboardingSuccess1501515
doneButtonToAssetList85539412911378
total123639416721759
Asset DetailsassetClickToPriceChart52156475
total52156475
Solana Asset DetailsassetClickToPriceChart4814849
total4814849
Import Srp HomeloginToHomeScreen20406220802123
openAccountMenuAfterLogin4855255
homeAfterImportWithNewWallet27272727572757
total480717048775068
Send TransactionsopenSendPageFromHome1811919
selectTokenToSendFormLoaded2012022
reviewTransactionToConfirmationPage8566857866
total89912905915
SwapopenSwapPageFromHome1299129143
fetchAndDisplaySwapQuotes46083046024659
total47512347524789
🌐 Dapp Page Load Benchmarks

Current Commit: 8265865 | Date: 2/20/2026

📄 Localhost MetaMask Test Dapp

Samples: 100

Summary

  • pageLoadTime-> current mean value: 1.04s (±53ms) 🟡 | historical mean value: 1.05s ⬇️ (historical data)
  • domContentLoaded-> current mean value: 724ms (±51ms) 🟢 | historical mean value: 733ms ⬇️ (historical data)
  • firstContentfulPaint-> current mean value: 77ms (±11ms) 🟢 | historical mean value: 79ms ⬇️ (historical data)

📈 Detailed Results

Metric Mean Std Dev Min Max P95 P99
pageLoadTime 1.04s 53ms 1.01s 1.34s 1.08s 1.34s
domContentLoaded 724ms 51ms 699ms 1.01s 764ms 1.01s
firstPaint 77ms 11ms 60ms 168ms 88ms 168ms
firstContentfulPaint 77ms 11ms 60ms 168ms 88ms 168ms
largestContentfulPaint 0ms 0ms 0ms 0ms 0ms 0ms
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 58.83 KiB (1.36%)
  • ui: 22.77 KiB (0.27%)
  • common: 10.6 KiB (0.09%)

@metamaskbotv2
Copy link
Contributor

metamaskbotv2 bot commented Feb 20, 2026

Builds ready [870c57a]
⚡ Performance Benchmarks (1352 ± 103 ms)
👆 Interaction Benchmarks
ActionMetricMean (ms)Std Dev (ms)P75 (ms)P95 (ms)
Load New Accountload_new_account29729315339
total29729315339
Confirm Txconfirm_tx6043860446056
total6043860446056
Bridge User Actionsbridge_load_page25134265311
bridge_load_asset_picker22879287355
bridge_search_token72216738742
total12017112501291
🔌 Startup Benchmarks
BuildMetricMean (ms)Min (ms)Max (ms)Std Dev (ms)P 75 (ms)P 95 (ms)
Chrome Browserify Startup Standard HomeuiStartup13521138162010313941558
load114996613799311871327
domContentLoaded114396113749211821323
domInteractive2717112192375
firstPaint178631283194209339
backgroundConnect19918024010202222
firstReactRender18123231923
initialActions106113
loadScripts9597831181929971141
setupStore1263351519
numNetworkReqs312295202287
Chrome Browserify Startup Power User HomeuiStartup3439160810840233141269839
load12461046163113512771575
domContentLoaded12301028161613212541565
domInteractive35191913230122
firstPaint205771195132275352
backgroundConnect15052538984197322267262
firstReactRender24165162635
initialActions105112
loadScripts1023831141212610481345
setupStore1454561624
numNetworkReqs87471452098123
Chrome Webpack Startup Standard HomeuiStartup94775613171099971151
load8056391224105888940
domContentLoaded7996361215105882933
domInteractive3117133242584
firstPaint1216744569145255
backgroundConnect29197693247
firstReactRender20124372234
initialActions104112
loadScripts7966341213104879929
setupStore1364871423
numNetworkReqs312293202584
Chrome Webpack Startup Power User HomeuiStartup1371901291838614392129
load7676451278105799984
domContentLoaded7566391268106783977
domInteractive39191772936121
firstPaint1556841875181304
backgroundConnect18413472994168310
firstReactRender23173832429
initialActions102111
loadScripts7536371259104781969
setupStore1254351521
numNetworkReqs91571762197138
Firefox Browserify Startup Standard HomeuiStartup16551407261516916871967
load13871152172910614401583
domContentLoaded13861147172910614401578
domInteractive82332444899166
firstPaint------
backgroundConnect67308328061111
firstReactRender13112011415
initialActions102012
loadScripts13601127164110214161536
setupStore216216331554
numNetworkReqs3119100202788
Firefox Browserify Startup Power User HomeuiStartup28361915601349530713505
load15781322475837616171977
domContentLoaded15771321475737616171977
domInteractive15853678120186414
firstPaint------
backgroundConnect46912011773137441039
firstReactRender18146761822
initialActions103122
loadScripts15321283470836815861803
setupStore12914753159135534
numNetworkReqs893819534100177
Firefox Webpack Startup Standard HomeuiStartup17651445324528717802075
load14741236290221114971653
domContentLoaded14731236290221114961653
domInteractive1002924545132145
firstPaint------
backgroundConnect68262714570177
firstReactRender16123241624
initialActions102122
loadScripts14461215287521014641617
setupStore236220301962
numNetworkReqs312195182778
Firefox Webpack Startup Power User HomeuiStartup28012222733063928883525
load16351363612254016392074
domContentLoaded16351363612254016392074
domInteractive17346706149211524
firstPaint------
backgroundConnect4361131355316600992
firstReactRender211510592230
initialActions2013122
loadScripts15951342606953616092027
setupStore14419572150161497
numNetworkReqs89402464492208
🧭 User Journey Benchmarks
BenchmarkMetricMean (ms)Std Dev (ms)P75 (ms)P95 (ms)
Onboarding Import WalletimportWalletToSocialScreen2181219220
srpButtonToSrpForm9109191
confirmSrpToPwForm2202222
pwFormToMetricsScreen1511617
metricsToWalletReadyScreen1611616
doneButtonToHomeScreen114535913271616
openAccountMenuToAccountListLoaded694470176837830
total845547987868955
Onboarding New WalletcreateWalletToSocialScreen2171218218
srpButtonToPwForm1095113114
createPwToRecoveryScreen8088
skipBackupToMetricsScreen3413435
agreeButtonToOnboardingSuccess1501616
doneButtonToAssetList7493128781301
total113331212551688
Asset DetailsassetClickToPriceChart4034045
total4034045
Solana Asset DetailsassetClickToPriceChart4724949
total4724949
Import Srp HomeloginToHomeScreen198715520562259
openAccountMenuAfterLogin48125367
homeAfterImportWithNewWallet251415126242688
total45485045864623
Send TransactionsopenSendPageFromHome1721821
selectTokenToSendFormLoaded29134048
reviewTransactionToConfirmationPage8494852853
total89812904917
SwapopenSwapPageFromHome1061106108
fetchAndDisplaySwapQuotes46557147244727
total47567848324832
🌐 Dapp Page Load Benchmarks

Current Commit: 870c57a | Date: 2/20/2026

📄 Localhost MetaMask Test Dapp

Samples: 100

Summary

  • pageLoadTime-> current mean value: 1.04s (±40ms) 🟡 | historical mean value: 1.05s ⬇️ (historical data)
  • domContentLoaded-> current mean value: 723ms (±38ms) 🟢 | historical mean value: 730ms ⬇️ (historical data)
  • firstContentfulPaint-> current mean value: 78ms (±12ms) 🟢 | historical mean value: 78ms ⬆️ (historical data)

📈 Detailed Results

Metric Mean Std Dev Min Max P95 P99
pageLoadTime 1.04s 40ms 1.01s 1.36s 1.07s 1.36s
domContentLoaded 723ms 38ms 700ms 1.03s 746ms 1.03s
firstPaint 78ms 12ms 60ms 188ms 88ms 188ms
firstContentfulPaint 78ms 12ms 60ms 188ms 88ms 188ms
largestContentfulPaint 0ms 0ms 0ms 0ms 0ms 0ms
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 58.83 KiB (1.36%)
  • ui: 22.77 KiB (0.27%)
  • common: 10.6 KiB (0.09%)

@n3ps n3ps requested a review from MajorLift February 20, 2026 17:30
@n3ps n3ps enabled auto-merge February 20, 2026 17:52
MajorLift
MajorLift previously approved these changes Feb 20, 2026
Copy link
Contributor

@MajorLift MajorLift left a comment

Choose a reason for hiding this comment

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

Could we edit the commit message (pr title) to something like

refactor: bump @metamask/core-backend to ^6.0.0 and set up ApiPlatformClient for transactions query

and also fill out the pr description changelog as well? (with the package bump noted)

This should be helpful for the release engineer and for ppl creating core releases who might need to find the commit where the core-backend bump landed.

Otherwise lgtm!

@n3ps n3ps changed the title refactor: use core api client refactor: bump @metamask/core-backend and set up ApiPlatformClient Feb 20, 2026
@n3ps n3ps changed the title refactor: bump @metamask/core-backend and set up ApiPlatformClient chore: bump @metamask/core-backend and set up ApiPlatformClient Feb 20, 2026
NidhiKJha
NidhiKJha previously approved these changes Feb 20, 2026
@n3ps n3ps dismissed stale reviews from NidhiKJha and MajorLift via 6a5dd10 February 20, 2026 18:43
@n3ps n3ps requested review from MajorLift and NidhiKJha February 20, 2026 18:45
@metamaskbotv2
Copy link
Contributor

metamaskbotv2 bot commented Feb 20, 2026

Builds ready [6a5dd10]
⚡ Performance Benchmarks (1404 ± 110 ms)
👆 Interaction Benchmarks
ActionMetricMean (ms)Std Dev (ms)P75 (ms)P95 (ms)
Load New Accountload_new_account2883291291
total2883291291
Confirm Txconfirm_tx6056460576062
total6056460576062
Bridge User Actionsbridge_load_page2344237237
bridge_load_asset_picker1717178178
bridge_search_token7188720732
total1127811301137
🔌 Startup Benchmarks
BuildMetricMean (ms)Min (ms)Max (ms)Std Dev (ms)P 75 (ms)P 95 (ms)
Chrome Browserify Startup Standard HomeuiStartup14041198179411014561635
load118199315589712261375
domContentLoaded117598915519512201363
domInteractive2717120202385
firstPaint172681260168209403
backgroundConnect20518725014208239
firstReactRender2113302292026
initialActions107113
loadScripts98779813569510381171
setupStore1365771621
numNetworkReqs312288202286
Chrome Browserify Startup Power User HomeuiStartup17221346420631717441945
load11201006214315211131409
domContentLoaded1106998212215111001401
domInteractive3318193263279
firstPaint178712136210218285
backgroundConnect3022491880165290333
firstReactRender23154662636
initialActions103111
loadScripts90280618191438921193
setupStore1674271930
numNetworkReqs58371622356122
Chrome Webpack Startup Standard HomeuiStartup87770311841159581103
load7456171026102818905
domContentLoaded7396121019101813897
domInteractive2615116192276
firstPaint1115738461130214
backgroundConnect29195593347
firstReactRender19124372234
initialActions104112
loadScripts7366101010100811893
setupStore1265261320
numNetworkReqs312297202588
Chrome Webpack Startup Power User HomeuiStartup1210861174115412921510
load71562910891047011006
domContentLoaded7066231082104691999
domInteractive36181743232124
firstPaint1246439467132264
backgroundConnect16813131244170292
firstReactRender22172932527
initialActions103111
loadScripts7036211070102689989
setupStore1253951417
numNetworkReqs953624648132161
Firefox Browserify Startup Standard HomeuiStartup16941457250421117122090
load14291212215917814621755
domContentLoaded14271207215917814621755
domInteractive883338266108235
firstPaint------
backgroundConnect5830170205992
firstReactRender14122011416
initialActions103112
loadScripts14011189213117314391720
setupStore16684121633
numNetworkReqs311995202789
Firefox Browserify Startup Power User HomeuiStartup27251965457544428463555
load16101291256630617252254
domContentLoaded16091290256630617252254
domInteractive13136761127126385
firstPaint------
backgroundConnect2971151448265276896
firstReactRender18146871823
initialActions103122
loadScripts15621238251928716202188
setupStore1629783224126714
numNetworkReqs61301463383133
Firefox Webpack Startup Standard HomeuiStartup17251432367232417162193
load14681214326829214721762
domContentLoaded14671210326829214721762
domInteractive108291670164129169
firstPaint------
backgroundConnect57202243557108
firstReactRender15122731624
initialActions102022
loadScripts14421194324329014441675
setupStore197139231659
numNetworkReqs312093172777
Firefox Webpack Startup Power User HomeuiStartup26061960393836727153379
load15341314231623516351990
domContentLoaded15341314231623516331990
domInteractive12633755138104478
firstPaint------
backgroundConnect231911062176214575
firstReactRender22157292230
initialActions203123
loadScripts15031272221822515891942
setupStore1638717203215635
numNetworkReqs58181363481124
🧭 User Journey Benchmarks
BenchmarkMetricMean (ms)Std Dev (ms)P75 (ms)P95 (ms)
Onboarding Import WalletimportWalletToSocialScreen2180218218
srpButtonToSrpForm8929091
confirmSrpToPwForm2102121
pwFormToMetricsScreen1401515
metricsToWalletReadyScreen1501515
doneButtonToHomeScreen74921778778
openAccountMenuToAccountListLoaded729653676617815
total846541987598898
Onboarding New WalletcreateWalletToSocialScreen2170218218
srpButtonToPwForm1031104104
createPwToRecoveryScreen8099
skipBackupToMetricsScreen3413435
agreeButtonToOnboardingSuccess1711719
doneButtonToAssetList85531511511294
total123730815301668
Asset DetailsassetClickToPriceChart3603636
total3603636
Solana Asset DetailsassetClickToPriceChart4634851
total4634851
Import Srp HomeloginToHomeScreen193513519922148
openAccountMenuAfterLogin3923941
homeAfterImportWithNewWallet241718825152743
total439322644734783
Send TransactionsopenSendPageFromHome2893535
selectTokenToSendFormLoaded1811920
reviewTransactionToConfirmationPage8516853861
total9005901907
SwapopenSwapPageFromHome1138116124
fetchAndDisplaySwapQuotes46598947634765
total47799748744913
🌐 Dapp Page Load Benchmarks

Current Commit: 6a5dd10 | Date: 2/20/2026

📄 Localhost MetaMask Test Dapp

Samples: 100

Summary

  • pageLoadTime-> current mean value: 1.08s (±73ms) 🟡 | historical mean value: 1.04s ⬆️ (historical data)
  • domContentLoaded-> current mean value: 756ms (±71ms) 🟢 | historical mean value: 726ms ⬆️ (historical data)
  • firstContentfulPaint-> current mean value: 81ms (±13ms) 🟢 | historical mean value: 80ms ⬆️ (historical data)

📈 Detailed Results

Metric Mean Std Dev Min Max P95 P99
pageLoadTime 1.08s 73ms 1.04s 1.36s 1.29s 1.36s
domContentLoaded 756ms 71ms 719ms 1.04s 958ms 1.04s
firstPaint 81ms 13ms 68ms 196ms 92ms 196ms
firstContentfulPaint 81ms 13ms 68ms 196ms 92ms 196ms
largestContentfulPaint 0ms 0ms 0ms 0ms 0ms 0ms
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 59.27 KiB (1.37%)
  • ui: 35.39 KiB (0.43%)
  • common: 11.87 KiB (0.11%)

Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

return (method: string): Promise<T | undefined | string> => {
if (method === 'getBearerToken') {
return Promise.resolve('mock-bearer-token-for-tests');
}
Copy link

Choose a reason for hiding this comment

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

Hardcoded mock shadows custom getBearerToken in test requests

Low Severity

The hardcoded getBearerToken check in createMockImplementation takes precedence over the requests map. Any future test passing { getBearerToken: customValue } in the requests argument will have that value silently ignored. The intercept belongs after the requests lookup (as a fallback) rather than before it.

Fix in Cursor Fix in Web

@metamaskbotv2
Copy link
Contributor

metamaskbotv2 bot commented Feb 23, 2026

Builds ready [e998768]
⚡ Performance Benchmarks (1353 ± 87 ms)
👆 Interaction Benchmarks
ActionMetricMean (ms)Std Dev (ms)P75 (ms)P95 (ms)
Load New Accountload_new_account26911279281
total26911279281
Confirm Txconfirm_tx60271260326047
total60271260326047
Bridge User Actionsbridge_load_page24226258279
bridge_load_asset_picker13914148155
bridge_search_token6963698699
total10901110971107
🔌 Startup Benchmarks
BuildMetricMean (ms)Min (ms)Max (ms)Std Dev (ms)P 75 (ms)P 95 (ms)
Chrome Browserify Startup Standard HomeuiStartup1353117816888713831548
load114198814068111661314
domContentLoaded113598613958011601304
domInteractive271694182474
firstPaint166641152124214259
backgroundConnect20018524611202225
firstReactRender19123642025
initialActions105113
loadScripts9507931209809731120
setupStore1262951520
numNetworkReqs312297202284
Chrome Browserify Startup Power User HomeuiStartup3355156110977185040717435
load12311060169111112631441
domContentLoaded12141036166410612361401
domInteractive3419286333279
firstPaint2058144792273333
backgroundConnect11742605038115514154245
firstReactRender25185772836
initialActions104111
loadScripts1005840145510510281203
setupStore1454961625
numNetworkReqs80281562692134
Chrome Webpack Startup Standard HomeuiStartup88170412271019461075
load757623104797815916
domContentLoaded751618103996809907
domInteractive2816137242293
firstPaint1206036273157288
backgroundConnect27195383041
firstReactRender18124171935
initialActions104112
loadScripts748616103095807904
setupStore1153341216
numNetworkReqs3122100202583
Chrome Webpack Startup Power User HomeuiStartup1265938234321713361664
load76965913551257581093
domContentLoaded75765213481267441086
domInteractive43202843939112
firstPaint167701109126190320
backgroundConnect17913564769171297
firstReactRender23184642429
initialActions102111
loadScripts75465013391247421075
setupStore1455581524
numNetworkReqs1345725639152202
Firefox Browserify Startup Standard HomeuiStartup16291391250918116541973
load13701163221414814041632
domContentLoaded13691163221414814031632
domInteractive813225449102187
firstPaint------
backgroundConnect5832255256179
firstReactRender13111811416
initialActions103112
loadScripts13431139217414213731582
setupStore188197241632
numNetworkReqs3220103222592
Firefox Browserify Startup Power User HomeuiStartup28082079502242230043444
load15331272313826915701847
domContentLoaded15331272313826915691846
domInteractive182461729242190430
firstPaint------
backgroundConnect44310811683116321067
firstReactRender17142321722
initialActions2039422
loadScripts14891248311626715241787
setupStore13611768166150493
numNetworkReqs87331843599168
Firefox Webpack Startup Standard HomeuiStartup17471514321619617931985
load14761261281517115131664
domContentLoaded14751256281517115131663
domInteractive932930650132169
firstPaint------
backgroundConnect66281933474144
firstReactRender16132931722
initialActions103122
loadScripts14451232278716514881585
setupStore217100191759
numNetworkReqs312086152964
Firefox Webpack Startup Power User HomeuiStartup27402039487148029483497
load15941264365936416072199
domContentLoaded15941263365936416072198
domInteractive186421454187234519
firstPaint------
backgroundConnect4589516523546481170
firstReactRender211486102231
initialActions202122
loadScripts15441248362135715741937
setupStore13617866158137455
numNetworkReqs87332274188175
🧭 User Journey Benchmarks
BenchmarkMetricMean (ms)Std Dev (ms)P75 (ms)P95 (ms)
Onboarding Import WalletimportWalletToSocialScreen2180218218
srpButtonToSrpForm9019191
confirmSrpToPwForm2102121
pwFormToMetricsScreen1501515
metricsToWalletReadyScreen1511616
doneButtonToHomeScreen94429012131352
openAccountMenuToAccountListLoaded685142570037499
total80288180858130
Onboarding New WalletcreateWalletToSocialScreen2171217218
srpButtonToPwForm1032105105
createPwToRecoveryScreen8088
skipBackupToMetricsScreen3313435
agreeButtonToOnboardingSuccess1501516
doneButtonToAssetList61931629663
total9983310161043
Asset DetailsassetClickToPriceChart4574756
total4574756
Solana Asset DetailsassetClickToPriceChart4714750
total4714750
Import Srp HomeloginToHomeScreen18841819051905
openAccountMenuAfterLogin3823941
homeAfterImportWithNewWallet263512226882823
total44867945114604
Send TransactionsopenSendPageFromHome32103943
selectTokenToSendFormLoaded2012121
reviewTransactionToConfirmationPage8572860860
total90810913919
SwapopenSwapPageFromHome1155118120
fetchAndDisplaySwapQuotes4600346044604
total47242047324759
🌐 Dapp Page Load Benchmarks

Current Commit: e998768 | Date: 2/23/2026

📄 Localhost MetaMask Test Dapp

Samples: 100

Summary

  • pageLoadTime-> current mean value: 1.04s (±72ms) 🟡 | historical mean value: 1.04s ⬇️ (historical data)
  • domContentLoaded-> current mean value: 732ms (±69ms) 🟢 | historical mean value: 727ms ⬆️ (historical data)
  • firstContentfulPaint-> current mean value: 77ms (±11ms) 🟢 | historical mean value: 80ms ⬇️ (historical data)

📈 Detailed Results

Metric Mean Std Dev Min Max P95 P99
pageLoadTime 1.04s 72ms 1.01s 1.33s 1.27s 1.33s
domContentLoaded 732ms 69ms 696ms 1.01s 954ms 1.01s
firstPaint 77ms 11ms 60ms 176ms 84ms 176ms
firstContentfulPaint 77ms 11ms 60ms 176ms 84ms 176ms
largestContentfulPaint 0ms 0ms 0ms 0ms 0ms 0ms
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 52.28 KiB (1.2%)
  • ui: -451 Bytes (-0.01%)
  • common: 8.17 KiB (0.07%)

@n3ps n3ps added this pull request to the merge queue Feb 23, 2026
Merged via the queue into main with commit 9cef35f Feb 23, 2026
177 checks passed
@n3ps n3ps deleted the n3ps/api-client branch February 23, 2026 15:38
@github-actions github-actions bot locked and limited conversation to collaborators Feb 23, 2026
@metamaskbot metamaskbot added the release-13.21.0 Issue or pull request that will be included in release 13.21.0 label Feb 23, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

release-13.21.0 Issue or pull request that will be included in release 13.21.0 size-M team-core-extension-ux Core Extension UX team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants