Skip to content

chore(runway): cherry-pick 0e57cdc#29268

Merged
gabrieledm merged 1 commit into
release/7.74.00from
runway-cherry-pick-7.74.0-1776953445
Apr 23, 2026
Merged

chore(runway): cherry-pick 0e57cdc#29268
gabrieledm merged 1 commit into
release/7.74.00from
runway-cherry-pick-7.74.0-1776953445

Conversation

@runway-github
Copy link
Copy Markdown
Contributor

@runway-github runway-github Bot commented Apr 23, 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.

[0e57cdc](https://github.com/MetaMask/metamask-mobile/commit/0e57cdcdf8fa5fdc35d1f81c2d92b9e67d847bec)

…ontroller to ^24.0.0 (#28943)

## **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**

```gherkin
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**

- [x] I've followed [MetaMask Contributor
Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask Mobile
Coding
Standards](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/CODING_GUIDELINES.md).
- [x] I've completed the PR template to the best of my ability
- [x] I've included tests if applicable
- [ ] I've documented my code using [JSDoc](https://jsdoc.app/) format
if applicable
- [ ] I've applied the right labels on the PR (see [labeling
guidelines](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/LABELING_GUIDELINES.md)).
Not required for external contributors.

#### 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.

<!-- CURSOR_SUMMARY -->
---

> [!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.
> 
> <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit
e0e1eb3. Bugbot is set up for automated
code reviews on this repo. Configure
[here](https://www.cursor.com/dashboard/bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
@runway-github runway-github Bot requested a review from a team as a code owner April 23, 2026 14:10
@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-bots Bot team (for MetaMask Bot, Runway Bot, etc.) label Apr 23, 2026
@github-actions github-actions Bot added the risk-high Extensive testing required · High bug introduction risk label Apr 23, 2026
@github-actions
Copy link
Copy Markdown
Contributor

🔍 Smart E2E Test Selection

⏭️ Smart E2E selection skipped - PR targets a release branch (release/*)

All E2E tests pre-selected.

View GitHub Actions results

@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
Updatednpm/​@​metamask/​smart-transactions-controller@​23.0.0 ⏵ 24.0.096 +1100100 +19750

View full report

Copy link
Copy Markdown
Contributor

@chloeYue chloeYue left a comment

Choose a reason for hiding this comment

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

LGTM

@sonarqubecloud
Copy link
Copy Markdown

@github-actions
Copy link
Copy Markdown
Contributor

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

@gabrieledm gabrieledm merged commit fc3b5d4 into release/7.74.00 Apr 23, 2026
111 checks passed
@gabrieledm gabrieledm deleted the runway-cherry-pick-7.74.0-1776953445 branch April 23, 2026 15:19
@github-actions github-actions Bot locked and limited conversation to collaborators Apr 23, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

risk-high Extensive testing required · High bug introduction risk size-S team-bots Bot team (for MetaMask Bot, Runway Bot, etc.)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants