Skip to content

feat: adopt SentinelApiService for transaction simulation - #38485

Draft
matthewwalsh0 wants to merge 1 commit into
mainfrom
feat/adopt-sentinel-simulation
Draft

matthewwalsh0 wants to merge 1 commit into
mainfrom
feat/adopt-sentinel-simulation

Conversation

@matthewwalsh0

Copy link
Copy Markdown
Member

Description

Adopts MetaMask/core#9476. With it, TransactionController sends all Sentinel simulation requests through the SentinelApiService:simulateTransactions messenger action.

  • Uses a preview build of @metamask/transaction-controller.
  • Adds a temporary Yarn patch to @metamask/wallet@18.0.0 that delegates SentinelApiService:simulateTransactions to the wallet's TransactionController messenger. This mirrors the core wallet change in #9476.
    • The patch is used instead of a wallet preview because adopting the latest wallet also needs the wallet 19 (AnalyticsController), wallet 20 (GeolocationController) and #10997 (NetworkEnablementController) migrations. Those are separate pieces of work.

SentinelApiService is already registered on the root messenger with AuthenticationController:getBearerToken delegated. Mobile doesn't use getSimulationConfig, so no code changes are needed.

Before merging, replace the preview build and the patch with released versions.

Changelog

CHANGELOG entry: null

Related issues

Refs: MetaMask/core#9476

Manual testing steps

Feature: Transaction simulation

  Scenario: user reviews a transaction with simulation enabled
    Given transaction simulations are enabled

    When user starts a send or dapp transaction
    Then the confirmation shows simulated balance changes

Screenshots/Recordings

N/A

Before

N/A

After

N/A

Pre-merge author checklist

Performance checks (if applicable)

  • I've tested on Android
    • Ideally on a mid-range device; emulator is acceptable
  • I've tested with a power user scenario
    • Use these power-user SRPs to import wallets with many accounts and tokens
  • I've instrumented key operations with Sentry traces for production performance metrics

For performance guidelines and tooling, see the Performance Guide.

Pre-merge reviewer checklist

  • I've manually tested the PR (e.g. pull and build branch, run the app, test code being changed).
  • I confirm that this PR addresses all acceptance criteria described in the ticket it closes and includes the necessary testing evidence such as recordings and or screenshots.

@github-actions github-actions Bot added size-S pr-not-ready-for-e2e Skip E2E and block merging. Remove this label once the PR is ready to run the E2E tests. labels Oct 29, 2026
@metamask-ci metamask-ci Bot added the team-confirmations Push issues to confirmations team label Oct 29, 2026
@metamask-ci

metamask-ci Bot commented Oct 29, 2026

Copy link
Copy Markdown
Contributor

PR template — items to address before "Ready for review"

Warnings — informational, address before merging:

  • Pre-merge author checklist has unchecked items (e.g. "I've applied the right labels on the PR (see labeling guidelines). Not required for external contributors."). Every box must be consciously checked — see docs/readme/ready-for-review.md.

See docs/readme/ready-for-review.md for the full Definition of Ready for Review.

@socket-security

Copy link
Copy Markdown

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Addednpm/​@​metamask-previews/​transaction-controller@​72.3.0-preview-313288d71831008098100

View full report

@matthewwalsh0 matthewwalsh0 removed the pr-not-ready-for-e2e Skip E2E and block merging. Remove this label once the PR is ready to run the E2E tests. label Oct 29, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Smart E2E Test Selection

Selected E2E tags: ALL

AI Confidence: 100

E2E reasoning

Expand to read

This PR makes two critical dependency changes:

  1. @metamask/transaction-controller upgraded to a preview version (72.2.1 → 72.3.0-preview-313288d71 from @metamask-previews scope): The transaction controller is central to virtually every on-chain user flow — sending ETH/ERC-20 tokens, confirmations, swaps, bridge, staking, perps, predictions, and card/ramps. A preview version upgrade carries regression risk across all these flows.

  2. @metamask/wallet patched (^18.0.0 → patched 18.0.0): The patch adds 'SentinelApiService:simulateTransactions' to the transaction controller's allowed actions list in the wallet initialization. This modifies the transaction simulation capability, which directly affects transaction confirmation previews (SmokeConfirmations) and any flow that relies on transaction simulation.

The combination of a preview transaction controller version and a wallet package patch that modifies transaction simulation behavior creates broad regression risk across:

  • SmokeConfirmations (transaction confirmations, simulation previews)
  • SmokeSwap (swap/bridge transactions)
  • SmokeStake (staking transactions)
  • SmokePerps (perps deposit transactions)
  • SmokePredictions (prediction market transactions)
  • SmokeMoney (card/ramps transactions)
  • SmokeWalletPlatform (transaction history)
  • SmokeAccounts (account management with transactions)
  • SmokeNetworkAbstractions/SmokeNetworkExpansion (cross-chain transactions)

The hard rule seed (controller-version-update) already identified ALL as the appropriate selection. This analysis confirms that assessment — the transaction controller touches every on-chain flow in the app.

View run

@sonarqubecloud

Copy link
Copy Markdown

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size-S team-confirmations Push issues to confirmations team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant