feat: config registry dynamic networks mobile#27201
feat: config registry dynamic networks mobile#27201wantedsystem wants to merge 9 commits intomainfrom
Conversation
|
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. |
|
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/config-registry-controller@0.1.0 |
Network access is expected: package fetches dynamic network config from MetaMask’s config registry API only. First-party package, no user-controlled or third-party URLs. Reviewed as legitimate use |
|
@metamaskbot update-mobile-fixture |
…egistry-dynamic-networks-mobile
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.
| typeof imageSource === 'object' && | ||
| 'uri' in imageSource && | ||
| (imageSource.uri?.endsWith('.svg') || | ||
| imageSource.uri?.startsWith('data:image/svg+xml')) ? ( |
There was a problem hiding this comment.
SVG URI detection fails with query parameters
Medium Severity
The SVG detection logic uses imageSource.uri?.endsWith('.svg') which fails for SVG URLs containing query parameters or fragments (e.g. https://cdn.example.com/icon.svg?v=2). Since these network icon URLs come from a dynamic registry API, URLs with cache-busting or auth query strings are common, and affected icons would silently fall through to the Image component which cannot render SVGs.
🔍 Smart E2E Test Selection
click to see 🤖 AI reasoning detailsE2E Test Selection: Performance Test Selection: |
|
|
✅ E2E Fixture Validation — Schema is up to date |





Description
Context :
We want the "Additional networks" list to come from a dynamic config API instead of a static list, so we can update featured networks without a client release.
Problem :
Featured networks are hardcoded in the App. Adding or changing featured networks (e.g. Linea, Avalanche) requires a new release.
Solution
We integrated the Config Registry Controller (behind the configRegistryApiEnabled remote feature flag). When the flag is on, the “Additional networks” list is built from the registry API (filtered to featured, active, non-testnet EVM networks and excluding chains already in the wallet). When the flag is off or the API isn’t ready, we keep using the existing static list. The registry is only used to decide which networks to offer to add; it never updates or overwrites networks the user has already added or customized (e.g. custom Linea RPC).
Changelog
CHANGELOG entry: - Integrated the dynamic network registry into MetaMask Extension
Related issues
Fixes:
Manual testing steps
Screenshots/Recordings
Before
After
Pre-merge author checklist
Pre-merge reviewer checklist
Note
Medium Risk
Medium risk: introduces a new engine controller and polling/fetch flow gated by a remote feature flag, plus new selector-driven UI data that could affect network list rendering and background state persistence.
Overview
Adds dynamic “Additional networks” sourcing via Config Registry. A new
ConfigRegistryControlleris wired intoEngine(types, background state change events, initial background state/log snapshots), with a dedicated messenger that also registers/retainsConfigRegistryApiService.Feature-flag gated fetch + polling.
configRegistryControllerInitstarts/stops polling based on theconfigRegistryApiEnabledremote flag (including runtime toggles) and performs an initial async fetch when enabled and no configs are persisted; failures fall back to a stub controller.UI now consumes a selector-derived list.
NetworkMultiSelectorswitches from the staticPopularListtogetAdditionalNetworksList, which returns either the static list (flag off/loading/no featured API data) or a mapped list of featured EVM networks not already added.Stability + visuals tweaks.
ExtendedMessenger.unsubscribebecomes tolerant of missing subscriptions,ErrorHandlertreatsPremature closeas non-fatal, andAvatarNetworkcan render SVG images viaSvgUri(with a new test).Written by Cursor Bugbot for commit 235552b. This will update automatically on new commits. Configure here.