Skip to content

fix: swap activity fee label paid by metamask#27268

Merged
maxime-oe merged 1 commit into
mainfrom
fix/gas-sponsored-swaps-activity-fee-label
Mar 23, 2026
Merged

fix: swap activity fee label paid by metamask#27268
maxime-oe merged 1 commit into
mainfrom
fix/gas-sponsored-swaps-activity-fee-label

Conversation

@maxime-oe
Copy link
Copy Markdown
Contributor

@maxime-oe maxime-oe commented Mar 10, 2026

Description

Changelog

CHANGELOG entry: adds "Paid by MetaMask" on Activity "Total gas fee" row when the tx was a gas-sponsored swap.

Related issues

Fixes: #27246

Manual testing steps

Feature: my feature name

  Scenario: user [verb for user action]
    Given [describe expected initial app state]

    When user [verb for user action]
    Then [describe expected outcome]
  1. Select Monad or SEI network (or any gas-sponsored network).
  2. Select the in-app Swap feature (or "buy/sell") selecting tokens from the same network.
  3. Perform the swap - "Paid by MetaMask".
  4. Once completed, click on the transaction item in the Activity tab.
  5. Observe content of the Transaction Detail view.

Screenshots/Recordings

Before

Showing a MON gas fee amount (zero).
image

After

Showing the "Paid by MetaMask" label.
image

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

Low Risk
Small UI-only change gated by existing isGasFeeSponsored flag; low risk aside from potential styling/layout regressions in the transaction details view.

Overview
Updates the Bridge/Swap transaction details screen to display a green Paid by MetaMask tag in the Total gas fee row when evmTxMeta.isGasFeeSponsored is true, instead of showing a (typically zero) native gas amount.

Introduces a small reusable PaidByMetaMask component using TagColored (with testID: paid-by-metamask) and keeps the prior fee amount rendering for non-sponsored transactions.

Written by Cursor Bugbot for commit 12125cd. This will update automatically on new commits. 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.

@metamaskbot metamaskbot added the team-networks Networks team label Mar 10, 2026
@github-actions
Copy link
Copy Markdown
Contributor

🔍 Smart E2E Test Selection

  • Selected E2E tags: SmokeTrade, SmokeConfirmations
  • Selected Performance tags: None (no tests recommended)
  • Risk Level: medium
  • AI Confidence: 85%
click to see 🤖 AI reasoning details

E2E Test Selection:
The change is in app/components/UI/Bridge/components/TransactionDetails/TransactionDetails.tsx, which is part of the Bridge flow UI under the Trade feature. Bridge flows are explicitly covered by SmokeTrade (token swaps and cross-chain bridging). Since SmokeTrade requires transaction confirmations as part of swap/bridge flows, SmokeConfirmations must also be selected per tag dependency rules.

This change affects transaction detail rendering within the bridge flow, which could impact:

  • Bridge execution UI
  • Transaction detail display during/after bridge
  • Integration with confirmation and activity flows

There are no changes to controllers, Engine, network management, identity, snaps, card, perps, predictions, or multi-chain APIs. Therefore, other tags (SmokeWalletPlatform, SmokeNetworkAbstractions, SmokeNetworkExpansion, SmokeMultiChainAPI, SmokeAccounts, SmokeIdentity, SmokeCard, SmokePerps, SmokePredictions, FlaskBuildTests) are not required.

The impact is scoped to a Trade subcomponent UI, with moderate risk because it is user-facing in a financial transaction flow.

Performance Test Selection:
The change is limited to a Bridge TransactionDetails UI component. There is no indication of changes to rendering-heavy lists, account selectors, asset loading logic, controller performance, app launch, onboarding, or swap quote fetching. Therefore, no dedicated performance test tags (e.g., @PerformanceSwaps, @PerformanceAssetLoading) are required.

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

@maxime-oe maxime-oe marked this pull request as ready for review March 10, 2026 19:40
@maxime-oe maxime-oe requested a review from a team as a code owner March 10, 2026 19:40
Copy link
Copy Markdown
Contributor

@cursor cursor Bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.

@maxime-oe maxime-oe enabled auto-merge March 23, 2026 11:10
@maxime-oe maxime-oe disabled auto-merge March 23, 2026 11:11
@maxime-oe maxime-oe added this pull request to the merge queue Mar 23, 2026
Merged via the queue into main with commit 963328b Mar 23, 2026
124 of 126 checks passed
@maxime-oe maxime-oe deleted the fix/gas-sponsored-swaps-activity-fee-label branch March 23, 2026 18:35
@github-actions github-actions Bot locked and limited conversation to collaborators Mar 23, 2026
@metamaskbot metamaskbot added the release-7.72.0 Issue or pull request that will be included in release 7.72.0 label Mar 23, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

release-7.72.0 Issue or pull request that will be included in release 7.72.0 size-S team-networks Networks team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Network Fee "Paid by Metamask" is not displayed on the Activity details page for Gas sponsored Swap transaction

4 participants