Skip to content

chore: Update Core Platform / Wallet Integrations controllers to expose all methods through messenger#8201

Open
Mrtenz wants to merge 13 commits intomainfrom
mrtenz/wallet-integrations-action-methods
Open

chore: Update Core Platform / Wallet Integrations controllers to expose all methods through messenger#8201
Mrtenz wants to merge 13 commits intomainfrom
mrtenz/wallet-integrations-action-methods

Conversation

@Mrtenz
Copy link
Member

@Mrtenz Mrtenz commented Mar 16, 2026

Explanation

This updates the following controllers to expose all methods through the messenger in a standardised way:

  • PermissionController.
  • PermissionLogController.
  • SelectedNetworkController.
  • SubjectMetadataController.

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

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, and SelectedNetworkController expose public methods via the messenger by switching to registerMethodActionHandlers with explicit MESSENGER_EXPOSED_METHODS lists.

Adds auto-generated *-method-action-types.ts files and re-exports their strongly named ...Action types from package index.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 a generate-method-action-types script plus tsx devDependency in affected packages.

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

@Mrtenz Mrtenz marked this pull request as ready for review March 16, 2026 13:14
@Mrtenz Mrtenz requested review from a team as code owners March 16, 2026 13:14
Copy link
Contributor

@mcmire mcmire left a comment

Choose a reason for hiding this comment

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

Just a few comments, but otherwise looks good to me.

@Mrtenz Mrtenz force-pushed the mrtenz/wallet-integrations-action-methods branch from 4d32eb4 to d9d6672 Compare March 17, 2026 11:55
mcmire
mcmire previously approved these changes Mar 17, 2026
Copy link
Contributor

@mcmire mcmire left a comment

Choose a reason for hiding this comment

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

LGTM! (well, aside from the conflicts)

};

export type SelectedNetworkControllerActions =
| SelectedNetworkControllerGetSelectedNetworkStateAction
Copy link
Contributor

Choose a reason for hiding this comment

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

This type should really be called SelectedNetworkControllerGetStateAction :( Oh well. Maybe we can fix this in another PR.

Copy link
Member Author

Choose a reason for hiding this comment

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

Agreed. Had to fix conflicts anyway, so I fixed this type too.

@Mrtenz Mrtenz force-pushed the mrtenz/wallet-integrations-action-methods branch from d9d6672 to 3f90ef5 Compare March 18, 2026 12:55
… favor of `SelectedNetworkControllerGetStateAction`
Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.

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.

2 participants