Skip to content

chore: bump @metamask/smart-transactions-controller to ^24.0.0#28943

Merged
rarquevaux merged 1 commit into
mainfrom
feat/bump-stx-controller-migration-flags
Apr 17, 2026
Merged

chore: bump @metamask/smart-transactions-controller to ^24.0.0#28943
rarquevaux merged 1 commit into
mainfrom
feat/bump-stx-controller-migration-flags

Conversation

@rarquevaux
Copy link
Copy Markdown
Contributor

@rarquevaux rarquevaux commented Apr 16, 2026

Description

Bumps @metamask/smart-transactions-controller from ^23.0.0 to ^24.0.0 and handles the v24 breaking change.

Breaking change in v24: The getBearerToken constructor parameter was removed. The controller now calls AuthenticationController:getBearerToken directly through its own runtime messenger.

Changes made:

  • AuthenticationController:getBearerToken moved from the init messenger to the controller's runtime messenger (getSmartTransactionsControllerMessenger)
  • Removed the getBearerToken wrapper closure from smart-transactions-controller-init.ts
  • Mobile-specific: setSentinelApiAuth still needs the bearer token and now calls controllerMessenger.call('AuthenticationController:getBearerToken') directly
  • Updated unit tests to match the new constructor signature

No behavior change — the bearer token is still fetched and sent with authenticated requests.

Changelog

CHANGELOG entry: null

Related issues

Fixes: STX-503

Manual testing steps

Feature: smart transactions controller bump

  Scenario: no behavior change
    Given the app is open
    When smart transactions are used
    Then they behave identically to before the bump

Screenshots/Recordings

Before

N/A

After

N/A

Pre-merge author checklist

Performance checks (if applicable)

N/A — no runtime behavior change.

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.

Note

Medium Risk
Touches auth token plumbing and messenger delegation for Smart Transactions/Sentinel requests; incorrect wiring could silently drop authenticated headers or break controller calls, though the change is narrowly scoped and covered by updated tests.

Overview
Updates @metamask/smart-transactions-controller to ^24.0.0 and adjusts the engine integration for the v24 breaking change that removes the controller constructor’s getBearerToken option.

AuthenticationController:getBearerToken delegation is moved to the Smart Transactions runtime messenger, and init-time delegation is removed; smart-transactions-controller-init now configures Sentinel auth via setSentinelApiAuth using a token getter that calls controllerMessenger.call('AuthenticationController:getBearerToken'). Unit tests are updated to assert the new constructor signature and to validate Sentinel auth setup/token retrieval behavior.

Reviewed by Cursor Bugbot for commit e0e1eb3. Bugbot is set up for automated code reviews on this repo. Configure here.

@github-actions
Copy link
Copy Markdown
Contributor

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.

@metamaskbotv2 metamaskbotv2 Bot added the team-transactions Transactions team label Apr 16, 2026
@socket-security
Copy link
Copy Markdown

socket-security Bot commented Apr 16, 2026

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

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Updatednpm/​@​metamask/​smart-transactions-controller@​23.0.0 ⏵ 24.0.096 +1100100 +19750

View full report

Handle the v24 breaking change: the controller no longer accepts a
getBearerToken constructor param; it now calls
AuthenticationController:getBearerToken directly through its runtime
messenger.

- Add AuthenticationController:getBearerToken to the STC runtime
  messenger's allowed actions (getSmartTransactionsControllerMessenger)
- Remove getBearerToken from the SmartTransactionsController constructor
  call
- Remove AuthenticationController:getBearerToken delegation from the
  init messenger and drop the AuthenticationControllerGetBearerTokenAction
  import from @metamask/profile-sync-controller
- Wire Sentinel API auth through the runtime controllerMessenger instead
  of the init messenger
@rarquevaux rarquevaux force-pushed the feat/bump-stx-controller-migration-flags branch from ea894fa to e0e1eb3 Compare April 16, 2026 20:20
@github-actions
Copy link
Copy Markdown
Contributor

🔍 Smart E2E Test Selection

⏭️ Smart E2E selection skipped - draft PR

All E2E tests pre-selected.

View GitHub Actions results

@sonarqubecloud
Copy link
Copy Markdown

@github-actions
Copy link
Copy Markdown
Contributor

E2E Fixture Validation — Schema is up to date
11 value mismatches detected (expected — fixture represents an existing user).
View details

@rarquevaux rarquevaux marked this pull request as ready for review April 16, 2026 21:12
@rarquevaux rarquevaux requested a review from a team as a code owner April 16, 2026 21:12
Copy link
Copy Markdown
Contributor

@Cal-L Cal-L left a comment

Choose a reason for hiding this comment

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

LGTM

@rarquevaux rarquevaux added this pull request to the merge queue Apr 17, 2026
Merged via the queue into main with commit 0e57cdc Apr 17, 2026
119 checks passed
@rarquevaux rarquevaux deleted the feat/bump-stx-controller-migration-flags branch April 17, 2026 18:20
@github-actions github-actions Bot locked and limited conversation to collaborators Apr 17, 2026
@metamaskbotv2 metamaskbotv2 Bot added the release-7.75.0 Issue or pull request that will be included in release 7.75.0 label Apr 17, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

release-7.75.0 Issue or pull request that will be included in release 7.75.0 size-S team-transactions Transactions team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants