Skip to content

Conversation

@khanti42
Copy link
Contributor

@khanti42 khanti42 commented Oct 24, 2025

Description

This PR introduces support for remotely blacklisting networks from the “Add Popular Network” list in the Custom Networks settings view.

The feature is being added specifically to temporarily hide Monad ahead of its November 19 launch, preventing users from adding or interacting with the network before it is officially live.

The new additionalNetworksBlacklist feature flag can be controlled remotely or via the MM_ADDITIONAL_NETWORK_BLACKLIST environment variable, enabling flexible rollout management for upcoming network launches.

Changelog

CHANGELOG entry: added feature flag support to temporarily hide Monad (and other networks) from the “Add Popular Network” list.

Related issues

Fixes:

Manual testing steps

Feature: Hide blacklisted networks from Custom Networks list

  Scenario: user opens the Add Popular Network view when a network is blacklisted
    Given the app has a remote feature flag "additionalNetworksBlacklist" containing the Monad chain ID
      And the user opens the List of Network pop-up
    When the Custom Network list is displayed
    Then the blacklisted network "Monad" should not be visible in the list
      And other non-blacklisted networks (e.g., Base, Polygon) should still be visible

  Scenario: user opens the Add Popular Network view when no network is blacklisted
    Given the app has an empty "additionalNetworksBlacklist" feature flag
      And the user open the List of Network pop-up
    When the Custom Network list is displayed
    Then all popular networks including "Monad" should be visible

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

Adds a feature flag (and ENV override) to hide specified chain IDs from the “Add Popular Network” list, with filtering utility and tests.

  • Settings UI:
    • CustomNetwork.tsx: Filters PopularList via getFilteredPopularNetworks using selectAdditionalNetworksBlacklistFeatureFlag to hide blacklisted chain IDs.
  • Selectors:
    • selectors/featureFlagController/networkBlacklist: New selectAdditionalNetworksBlacklistFeatureFlag with MM_ADDITIONAL_NETWORK_BLACKLIST ENV override parsing.
  • Utils:
    • util/networks/customNetworks.tsx: Add getFilteredPopularNetworks(blacklistedChainIds, baseNetworkList?) to exclude blacklisted networks.
  • Tests:
    • Component test updates to verify hidden/visible networks based on blacklist.
    • Selector tests for remote flag and ENV parsing edge cases.
    • Utils tests for filtering behavior.
  • E2E Mocks:
    • e2e/api-mocking/helpers/remoteFeatureFlagsHelper.ts: Include additionalNetworksBlacklist default in mocked flags.

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

@khanti42 khanti42 requested review from a team as code owners October 24, 2025 14:19
@khanti42 khanti42 added the DO-NOT-MERGE Pull requests that should not be merged label Oct 24, 2025
@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.

cursor[bot]

This comment was marked as outdated.

Base automatically changed from feat/add-monad-network to main October 29, 2025 04:18
@khanti42 khanti42 requested review from a team as code owners October 29, 2025 04:18
@khanti42 khanti42 requested review from a team as code owners October 29, 2025 07:28
@github-actions github-actions bot added size-L and removed size-M labels Oct 29, 2025
@khanti42 khanti42 force-pushed the feat/blacklist-custom-network-feature-flag branch from 977076d to f454b02 Compare October 29, 2025 07:58
@github-actions github-actions bot added size-M and removed size-L labels Oct 29, 2025
@khanti42 khanti42 changed the title feat: blacklist custom network feature flag feat: add feature flag to blacklist custom networks (used to hide Monad before launch) Oct 29, 2025
Copy link
Contributor

@vivek-consensys vivek-consensys left a comment

Choose a reason for hiding this comment

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

Tested with feature flag set as true and false via LD

@vivek-consensys vivek-consensys added the QA Passed QA testing has been completed and passed label Oct 29, 2025
@khanti42 khanti42 removed the DO-NOT-MERGE Pull requests that should not be merged label Oct 29, 2025
@vivek-consensys vivek-consensys removed the request for review from a team October 29, 2025 11:22
@vivek-consensys vivek-consensys removed request for a team October 29, 2025 11:22
@github-project-automation github-project-automation bot moved this to Needs dev review in PR review queue Oct 29, 2025
@khanti42 khanti42 requested a review from a team October 29, 2025 11:29
@sonarqubecloud
Copy link

@github-project-automation github-project-automation bot moved this from Needs dev review to Review finalised - Ready to be merged in PR review queue Oct 29, 2025
@vivek-consensys vivek-consensys added this pull request to the merge queue Oct 29, 2025
Merged via the queue into main with commit 0603233 Oct 29, 2025
87 checks passed
@vivek-consensys vivek-consensys deleted the feat/blacklist-custom-network-feature-flag branch October 29, 2025 12:31
@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 Oct 29, 2025
@github-actions github-actions bot locked and limited conversation to collaborators Oct 29, 2025
@metamaskbot metamaskbot added the release-7.59.0 Issue or pull request that will be included in release 7.59.0 label Oct 29, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

QA Passed QA testing has been completed and passed release-7.59.0 Issue or pull request that will be included in release 7.59.0 size-M team-network-enablement

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

5 participants