feat: Expose all PerpsController methods through messenger#28257
feat: Expose all PerpsController methods through messenger#28257cryptodev-2s merged 8 commits intomainfrom
Conversation
|
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. |
- Expand MESSENGER_EXPOSED_METHODS from 35 to 84 methods (alphabetized) - Auto-generate action types via messenger-generate-action-types CLI - Export PerpsControllerGetStateAction and all action types - Add generate-action-types scripts to lint and lint:fix
74a7a22 to
29dfc64
Compare
| "clean": "yarn clean:ios && yarn clean:android && yarn install --immutable", | ||
| "lint": "NODE_OPTIONS='--max-old-space-size=8192' eslint '**/*.{js,ts,tsx}' --cache", | ||
| "lint:fix": "NODE_OPTIONS='--max-old-space-size=8192' eslint '**/*.{js,ts,tsx}' --fix --cache", | ||
| "generate-method-action-types": "messenger-generate-action-types --fix app/controllers/perps && prettier --write 'app/controllers/perps/*-method-action-types.ts'", |
There was a problem hiding this comment.
🔍 Smart E2E Test Selection
click to see 🤖 AI reasoning detailsE2E Test Selection:
Impact: Changes are additive and confined to the Perps controller. No Engine initialization changes, no other controller modifications. The expanded messenger API means Perps features now have more capabilities exposed, which could affect Perps UI flows. Tag selection rationale:
The changes don't affect other controller domains, navigation, or shared components, so other tags are not warranted. Performance Test Selection: |
|
✅ E2E Fixture Validation — Schema is up to date |
|



Description
Mirrors MetaMask/core#8352 for the mobile PerpsController.
MESSENGER_EXPOSED_METHODSfrom 35 to 84 methods (alphabetized)PerpsController-method-action-types.tsusingmessenger-generate-action-typesCLIPerpsControllerGetStateActionand all individual action typesgenerate-method-action-typescheck/fix scripts tolint/lint:fixChangelog
CHANGELOG entry: null
Related issues
Fixes: N/A
Manual testing steps
N/A — type-only changes, no user-facing behavior
Screenshots/Recordings
Before
N/A
After
N/A
Pre-merge author checklist
Pre-merge reviewer checklist
Note
Medium Risk
Expands the messenger-exposed surface area of
PerpsController, which could affect callers and permissions if any method was not intended to be remotely invokable. Also adds a new lint-time codegen check that may introduce CI failures if generation drifts across environments.Overview
Exposes the full
PerpsControllerAPI through the messenger by expanding and alphabetizingMESSENGER_EXPOSED_METHODS, and introduces a namedPerpsControllerGetStateActiontype.Switches Perps messenger action typing to generated output:
PerpsController-method-action-types.tsis regenerated to include JSDoc’d action types for all controller methods andindex.tsnow re-exports these individual action types.Build/CI enforcement changes: bumps
@metamask/messengerto^1.1.0(for the codegen CLI) and wiresmessenger-generate-action-typesintolint/lint:fixvia newgenerate-method-action-typesscripts to keep generated types in sync.Written by Cursor Bugbot for commit 0fe513d. This will update automatically on new commits. Configure here.