feat: Add support for data services extending BaseDataService#27921
Conversation
| @@ -350,7 +351,7 @@ | |||
| "@sentry/react-native": "~6.15.0", | |||
| "@shopify/flash-list": "2.0.3", | |||
| "@solana/addresses": "2.0.0", | |||
| "@tanstack/react-query": "^5.90.20", | |||
| "@tanstack/react-query": "^4.43.0", | |||
There was a problem hiding this comment.
Temporary downgrade until React 18 is introduced on extension.
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
|
All alerts resolved. Learn more about Socket for GitHub. This PR previously contained dependency changes with security issues that have been resolved, removed, or ignored. Ignoring alerts on:
|
|
@SocketSecurity ignore npm/@metamask/base-data-service@0.1.0 False positive, this package does not have access to the fetch global on its own. Nevertheless we own the package. |
cb60f36 to
bd2ab08
Compare
|
@SocketSecurity ignore npm/@metamask/base-data-service@0.1.1 False positive, this package does not have access to the fetch global on its own. Nevertheless we own the package. |
28aec95 to
088a264
Compare
🔍 Smart E2E Test Selection
click to see 🤖 AI reasoning detailsE2E Test Selection: Key observations:
Selected tags rationale:
Not selecting all tags because DATA_SERVICES is empty (no new data service behavior), the QueryClient options are preserved, and the change is primarily infrastructure scaffolding with low likelihood of breaking existing query patterns. Performance Test Selection: |
|
✅ E2E Fixture Validation — Schema is up to date |
|


Description
Replace the default
QueryClientwith a customQueryClientfromcreateUIQueryClient. This establishes the query client required for using theBaseDataServicepattern from the core repo, which handles cache syncing. Existing UI-only queries should work as they did previously.Changelog
CHANGELOG entry: null
Related issues
https://consensyssoftware.atlassian.net/browse/WPC-445
Note
Medium Risk
Moderate risk because it changes how the global React Query
QueryClientis constructed and introduces messenger-backed call/subscribe plumbing that could affect caching and network behavior across the app.Overview
Switches
ReactQueryServiceto build itsqueryClientvia@metamask/react-data-query’screateUIQueryClient, passing an Engine messenger adapter to support data services and cache syncing while keeping the existing default query options.Adds a
DATA_SERVICESregistry (currently empty) for wiring in available data services, updates unit tests to validate the new client defaults and cache clearing behavior, and adds the new@metamask/react-data-querydependency (plus lockfile updates).Written by Cursor Bugbot for commit 088a264. This will update automatically on new commits. Configure here.