Skip to content

Conversation

@runway-github
Copy link
Contributor

@runway-github runway-github bot commented Nov 20, 2025

Description

Support EIP-7702 gas station when depositing with MetaMask Pay.

Changelog

CHANGELOG entry: null

Related issues

Fixes:
#6150

Manual testing steps

Screenshots/Recordings

Before

After

Pre-merge author checklist

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

Adds gas-fee token support to pay balance/fee checks, delegates getGasFeeTokens, updates transaction-pay-controller to v10, and removes "no gas" token disabling logic.

  • Confirmations > Alerts:
    • Handle fees.isSourceGasFeeToken in useInsufficientPayTokenBalanceAlert to include source network fees in totals when using a gas-fee token, and skip native-fee insufficiency in that case.
  • Utils:
    • Simplify getAvailableTokens by removing native-gas dependency and disabling logic; no longer sets disabled/disabledMessage.
  • Engine Messenger:
    • Delegate TransactionController:getGasFeeTokens to Transaction Pay controller messenger.
  • Dependencies:
    • Bump @metamask/transaction-pay-controller to ^10.0.0.
  • Tests:
    • Update alert tests to use persistent mocks and add cases for gas-fee token behavior; remove test asserting disabled token when no native gas.

Written by Cursor Bugbot for commit eac80ae. This will update automatically on new commits. Configure here.

b5472e1

## **Description**

Support EIP-7702 gas station when depositing with MetaMask Pay.

## **Changelog**

CHANGELOG entry: null

## **Related issues**

Fixes:
[#6150](MetaMask/MetaMask-planning#6150)

## **Manual testing steps**

## **Screenshots/Recordings**

### **Before**

### **After**

## **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
- [x] I’ve documented my code using [JSDoc](https://jsdoc.app/) format
if applicable
- [x] 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.

## **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]
> Adds gas fee token awareness to insufficient balance alerts,
simplifies available token selection logic, delegates getGasFeeTokens,
and upgrades transaction-pay-controller to v10.
> 
> - **Confirmations / Alerts**:
> - Consider `fees.isSourceGasFeeToken` in fee/amount calculations and
source network checks within `useInsufficientPayTokenBalanceAlert`.
> - Add tests covering gas fee token scenarios and adjust mocks
accordingly.
> - **Utils (`transaction-pay`)**:
> - Simplify `getAvailableTokens`: remove "no native gas" disablement
and related i18n; return tokens based on balance/selection/required
status only.
>   - Update tests to drop disabled-message case.
> - **Engine / Messenger**:
> - Delegate `TransactionController:getGasFeeTokens` to the Transaction
Pay controller messenger.
> - **Dependencies**:
> - Bump `@metamask/transaction-pay-controller` to `^10.0.0` (lockfile
updated).
> 
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
5a0d198. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
@runway-github runway-github bot requested review from a team as code owners November 20, 2025 22:54
@metamaskbot metamaskbot added the team-bots Bot team (for MetaMask Bot, Runway Bot, etc.) label Nov 20, 2025
@socket-security
Copy link

socket-security bot commented Nov 20, 2025

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

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Updatednpm/​@​metamask/​transaction-pay-controller@​9.0.0 ⏵ 10.0.079 +110078 +196 +1100

View full report

@github-actions
Copy link
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.

@github-actions
Copy link
Contributor

🔍 Smart E2E Test Selection

  • Selected E2E tags: SmokeAccounts, SmokeCore, SmokeConfirmationsRedesigned, SmokeIdentity, SmokeNetworkAbstractions, SmokeNetworkExpansion, SmokeTrade, SmokeWalletPlatform, SmokeWalletUX, SmokeAssets, SmokeSwaps, SmokeStake, SmokeCard, SmokeNotifications, SmokeRewards, SmokePerps, SmokeRamps, SmokeMultiChainPermissions, SmokeAnalytics, SmokeMultiChainAPI, SmokePredictions
  • Risk Level: high
  • AI Confidence: %
click to see 🤖 AI reasoning details

Fallback: AI analysis did not complete successfully. Running all tests.

View GitHub Actions results

@sonarqubecloud
Copy link

@joaoloureirop joaoloureirop merged commit c773fdf into release/7.60.0 Nov 21, 2025
80 checks passed
@joaoloureirop joaoloureirop deleted the cherry-pick-7-60-0-b5472e1 branch November 21, 2025 11:56
@github-actions github-actions bot locked and limited conversation to collaborators Nov 21, 2025
@metamaskbot metamaskbot added the release-7.60.0 Issue or pull request that will be included in release 7.60.0 label Nov 21, 2025
@metamaskbot
Copy link
Collaborator

No release label on PR. Adding release label release-7.60.0 on PR, as PR was cherry-picked in branch 7.60.0.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

release-7.60.0 Issue or pull request that will be included in release 7.60.0 size-M team-bots Bot team (for MetaMask Bot, Runway Bot, etc.)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants