Conversation
mcmire
reviewed
Mar 16, 2026
Contributor
mcmire
left a comment
There was a problem hiding this comment.
Just a few comments, but otherwise looks good to me.
mcmire
reviewed
Mar 16, 2026
4d32eb4 to
d9d6672
Compare
mcmire
previously approved these changes
Mar 17, 2026
mcmire
reviewed
Mar 17, 2026
| type: typeof SelectedNetworkControllerActionTypes.setNetworkClientIdForDomain; | ||
| handler: SelectedNetworkController['setNetworkClientIdForDomain']; | ||
| }; | ||
|
|
||
| export type SelectedNetworkControllerActions = | ||
| | SelectedNetworkControllerGetSelectedNetworkStateAction |
Contributor
There was a problem hiding this comment.
This type should really be called SelectedNetworkControllerGetStateAction :( Oh well. Maybe we can fix this in another PR.
Member
Author
There was a problem hiding this comment.
Agreed. Had to fix conflicts anyway, so I fixed this type too.
Co-authored-by: Elliot Winkler <elliot.winkler@gmail.com>
Co-authored-by: Elliot Winkler <elliot.winkler@gmail.com>
Co-authored-by: Elliot Winkler <elliot.winkler@gmail.com>
d9d6672 to
3f90ef5
Compare
… favor of `SelectedNetworkControllerGetStateAction`
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.
jiexi
approved these changes
Mar 19, 2026
4 tasks
pull Bot
pushed a commit
to Reality2byte/core
that referenced
this pull request
May 4, 2026
…enger (MetaMask#8675) ## Explanation This exposes missing methods used in the clients through the messenger after MetaMask#8201 ## References Progresses https://consensyssoftware.atlassian.net/browse/WPC-989 ## 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](https://github.com/MetaMask/core/tree/main/docs/processes/updating-changelogs.md) - [ ] I've introduced [breaking changes](https://github.com/MetaMask/core/tree/main/docs/processes/breaking-changes.md) in this PR and have prepared draft pull requests for clients and consumer packages to resolve them <!-- CURSOR_SUMMARY --> --- > [!NOTE] > **Low Risk** > Low risk: this primarily expands the messenger-exposed API surface and TypeScript action types without changing permission logic, but consumers may start depending on these newly exposed actions. > > **Overview** > **Exposes additional `PermissionController` methods via the messenger** by adding new action types and including them in the controller’s `MESSENGER_EXPOSED_METHODS` allowlist. > > Newly exposed actions include `acceptPermissionsRequest`, `rejectPermissionsRequest`, `revokePermission`, `updatePermissionsByCaveat`, and `getPermission`, with corresponding exports from the package entrypoint and a changelog entry documenting the additions. > > <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit 092f6a5. Bugbot is set up for automated code reviews on this repo. Configure [here](https://www.cursor.com/dashboard/bugbot).</sup> <!-- /CURSOR_SUMMARY -->
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
This updates the following controllers to expose all methods through the messenger in a standardised way:
PermissionController.PermissionLogController.SelectedNetworkController.SubjectMetadataController.References
Checklist
Note
Medium Risk
Changes messenger action registration and exported action type surface for multiple controllers; consumers relying on old action types or unexposed actions may see TypeScript/API breakage despite deprecations.
Overview
Standardizes how
PermissionController,SubjectMetadataController,PermissionLogController, andSelectedNetworkControllerexpose public methods via the messenger by switching toregisterMethodActionHandlerswith explicitMESSENGER_EXPOSED_METHODSlists.Adds auto-generated
*-method-action-types.tsfiles and re-exports their strongly named...Actiontypes from packageindex.ts, while deprecating older action type aliases (e.g.,GetPermissionControllerState,SelectedNetworkControllerGetSelectedNetworkStateAction).Updates tests to invoke controllers through messenger calls (and adds minimal mocking for
ApprovalController:addRequest), and adds agenerate-method-action-typesscript plustsxdevDependency in affected packages.Written by Cursor Bugbot for commit 7b70fe7. This will update automatically on new commits. Configure here.