Skip to content

feat!: wire NetworkEnablementController to ConfigRegistryController#9611

Draft
mikesposito wants to merge 5 commits into
mainfrom
me/network-enablement-controller-dynamic-registry
Draft

feat!: wire NetworkEnablementController to ConfigRegistryController#9611
mikesposito wants to merge 5 commits into
mainfrom
me/network-enablement-controller-dynamic-registry

Conversation

@mikesposito

Copy link
Copy Markdown
Member

Explanation

NetworkEnablementController uses bundled constants to establish which networks are "popular". We want to keep using those constants as fallback, and change primary source to ConfigRegistryController.

References

Checklist

  • I've updated the test suite for new or updated code as appropriate
  • I've updated documentation (JSDoc, Markdown, etc.) for new or updated code as appropriate
  • I've communicated my changes to consumers by updating changelogs for packages I've changed
  • I've introduced breaking changes in this PR and have prepared draft pull requests for clients and consumer packages to resolve them

@socket-security

socket-security Bot commented Jul 22, 2026

Copy link
Copy Markdown

No dependency changes detected. Learn more about Socket for GitHub.

👍 No dependency changes detected in pull request

Comment on lines -1477 to -1483
const { controller, messenger } = setupController();

// Mock the network configurations to include Bitcoin
jest
.spyOn(messenger, 'call')
// eslint-disable-next-line @typescript-eslint/no-explicit-any
.mockImplementation((actionType: string, ..._args: unknown[]): any => {

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

These mocks were a bit messy. Mocking the entire messenger.call method has two big drawbacks:

  1. Each new messenger call introduced breaks all of these test cases using this mocking pattern
  2. This test case is forced to mock all required messenger actions, even if it only needs one of them

Comment thread packages/network-enablement-controller/CHANGELOG.md Outdated
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant