feat(perps): align PerpsController with core PR #8633 (isInternal flag)#30413
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. |
🔍 Smart E2E Test Selection
click to see 🤖 AI reasoning detailsE2E Test Selection: Why these tags:
Risk level: Medium - The change is small and targeted, but it modifies transaction submission behavior in a financial flow (perps deposits), which warrants careful validation. The Performance Test Selection: |
Worker reportComments Report — PR #30413
No inline review comments. No CHANGES_REQUESTED reviews. No human reviewer comments. CI Failure (Unit tests shard 8) — FixedCI run
Both expected the addTransaction options object without the new Totals
|
|



Description
Mirrors the change from MetaMask/core#8633 into mobile ahead of the full migration to core, so the mobile copy of
PerpsControllerstays in sync with the upstream controller. The single substantive change forwardsisInternal: truein theoptionspayload whenPerpsControllersubmits a transaction via theTransactionControllermessenger, matching the new core behavior that flags controller-originated transactions as internal.This keeps both codebases behaviorally identical until mobile retires its local
PerpsControllerin favor of the core package.Changelog
CHANGELOG entry: null
Related issues
Fixes:
Manual testing steps
Screenshots/Recordings
Before
N/A — behavioral parity change, no user-visible UI difference.
After
N/A — behavioral parity change, no user-visible UI difference.
Pre-merge author checklist
Performance checks (if applicable)
Pre-merge reviewer checklist
Note
Medium Risk
Changes the options passed to
TransactionController:addTransactionfor perps flows, which could affect how transactions are classified/handled downstream (e.g., UI filtering or telemetry). Scope is small and covered by updated unit tests.Overview
Perps transactions submitted via
PerpsControllernow always forwardisInternal: truewhen callingTransactionController:addTransaction, aligning mobile behavior with the upstream core controller.Tests for
depositWithConfirmation(including theperpsDepositandperpsDepositAndOrderpaths) are updated to assert the newisInternalflag in the messenger call options.Reviewed by Cursor Bugbot for commit 93a877e. Bugbot is set up for automated code reviews on this repo. Configure here.