feat!: wire NetworkEnablementController to ConfigRegistryController#9611
Draft
mikesposito wants to merge 5 commits into
Draft
feat!: wire NetworkEnablementController to ConfigRegistryController#9611mikesposito wants to merge 5 commits into
NetworkEnablementController to ConfigRegistryController#9611mikesposito wants to merge 5 commits into
Conversation
|
No dependency changes detected. Learn more about Socket for GitHub. 👍 No dependency changes detected in pull request |
mikesposito
commented
Jul 22, 2026
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 => { |
Member
Author
There was a problem hiding this comment.
These mocks were a bit messy. Mocking the entire messenger.call method has two big drawbacks:
- Each new messenger call introduced breaks all of these test cases using this mocking pattern
- This test case is forced to mock all required messenger actions, even if it only needs one of them
mikesposito
commented
Jul 22, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Explanation
NetworkEnablementControlleruses bundled constants to establish which networks are "popular". We want to keep using those constants as fallback, and change primary source toConfigRegistryController.References
Checklist