Skip to content

release(runway): cherry-pick fix: restored old behavior to show Paid by MetaMask label in sponsored transactions from activity page cp-13.41.0 - #44843

Merged
sleepytanya merged 1 commit into
release/13.41.0from
runway-cherry-pick-13.41.0-1784888368
Jul 24, 2026
Merged

sleepytanya merged 1 commit into
release/13.41.0from
runway-cherry-pick-13.41.0-1784888368

Conversation

@runway-github

@runway-github runway-github Bot commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

Description

Fixes Monad swap activity details showing a network fee amount instead
of Paid by MetaMask for gas-sponsored swaps.
This PR reuses the existing gas sponsorship display logic and applies it
to the new Activity Details fee rows.
When a local transaction is marked as gas-sponsored, Activity Details
now renders the network fee as Paid by MetaMask instead of showing a
calculated fee.
Also adds unit tests for the sponsorship logic and fee row rendering.

Changelog

CHANGELOG entry: Fixed sponsored network fee transfer to show the Paid by MetaMask label in activity page

Related issues

Fixes: https://consensyssoftware.atlassian.net/browse/WPN-1713

Manual testing steps

  1. Perform a MON to USDC swap on Monad.
  2. Open the Activity tab.
  3. Click the completed swap transaction.
  4. Verify the transaction details show:
    • Network fee
    • Paid by MetaMask
  5. Open the same swap from the token details activity list
  6. Verify the token details transaction view also shows
    • Network fee
    • Paid by MetaMask
  7. As a regression check, open a normal non-sponsored transaction
  8. Verify normal transactions still show the calculated network fee
    amount instead of Paid by MetaMask
  9. As another regression check, verify rejected transactions do not
    show Paid by MetaMask

Screenshots/Recordings

Before

625474154-06befb51-1ed3-48be-8a88-a91cbd295c6a

After

Screenshot From 2026-07-23
15-51-51

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
Display-only activity fee labeling with shared sponsorship helper;
covered by unit tests and no payment or signing logic changes.

Overview
Gas-sponsored swaps (e.g. Monad) were showing a calculated network
fee
in Activity Details instead of Paid by MetaMask. This change
wires the same sponsorship rules used on the legacy transaction
breakdown into the activity fee pipeline.

Local activity items now attach a gas-fee-sponsored fee marker when
isGasFeeSponsored applies (with hardware wallets,
failed-without-receipt, revoke delegation, and rejected txs excluded).
When API-enriched activity replaces the local row,
mergeActivityItemSponsoredFees keeps that marker and drops the API’s
base network fee. FeesRows renders the sponsored type as Paid by
MetaMask
via SuccessPill.

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

[4ed04ec](https://github.com/MetaMask/metamask-extension/commit/4ed04ec7723cfe5761074e195650c5d7cff2638d)

…by MetaMask label in sponsored transactions from activity page cp-13.41.0 (#44780)

<!--
Please submit this PR as a draft initially.
Do not mark it as "Ready for review" until the template has been
completely filled out, and PR status checks have passed at least once.
-->

## **Description**

<!--
Write a short description of the changes included in this pull request,
also include relevant motivation and context. Have in mind the following
questions:
1. What is the reason for the change?
2. What is the improvement/solution?
-->

Fixes Monad swap activity details showing a network fee amount instead
of `Paid by MetaMask` for gas-sponsored swaps.
This PR reuses the existing gas sponsorship display logic and applies it
to the new Activity Details fee rows.
When a local transaction is marked as gas-sponsored, Activity Details
now renders the network fee as `Paid by MetaMask` instead of showing a
calculated fee.
Also adds unit tests for the sponsorship logic and fee row rendering.

## **Changelog**

<!--
If this PR is not End-User-Facing and should not show up in the
CHANGELOG, you can choose to either:
1. Write `CHANGELOG entry: null`
2. Label with `no-changelog`

If this PR is End-User-Facing, please write a short User-Facing
description in the past tense like:
`CHANGELOG entry: Added a new tab for users to see their NFTs`
`CHANGELOG entry: Fixed a bug that was causing some NFTs to flicker`

(This helps the Release Engineer do their job more quickly and
accurately)
-->

CHANGELOG entry: Fixed sponsored network fee transfer to show the `Paid
by MetaMask` label in activity page

## **Related issues**

Fixes: https://consensyssoftware.atlassian.net/browse/WPN-1713

## **Manual testing steps**

1. Perform a MON to USDC swap on Monad.
2. Open the Activity tab.
3. Click the completed swap transaction.
4. Verify the transaction details show:
    - Network fee
    - Paid by MetaMask
5. Open the same swap from the token details activity list
6. Verify the token details transaction view also shows
    - Network fee
    - Paid by MetaMask
10. As a regression check, open a normal non-sponsored transaction
11. Verify normal transactions still show the calculated network fee
amount instead of `Paid by MetaMask`
12. As another regression check, verify rejected transactions do not
show `Paid by MetaMask`

## **Screenshots/Recordings**

<!-- If applicable, add screenshots and/or recordings to visualize the
before and after of your change. -->

### **Before**

<!-- [screenshots/recordings] -->
<img width="831" height="813"
alt="625474154-06befb51-1ed3-48be-8a88-a91cbd295c6a"
src="https://github.com/user-attachments/assets/da34bba1-ba3c-47c1-98f0-432494f4a094"
/>

### **After**

<!-- [screenshots/recordings] -->
<img width="1009" height="1283" alt="Screenshot From 2026-07-23
15-51-51"
src="https://github.com/user-attachments/assets/9b921be1-41c5-4906-94a7-1376c9f8b0a5"
/>

## **Pre-merge author checklist**

- [X] I've followed [MetaMask Contributor
Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask
Extension Coding
Standards](https://github.com/MetaMask/metamask-extension/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-extension/blob/main/.github/guidelines/LABELING_GUIDELINES.md)).
Not required for external contributors.

## **Pre-merge reviewer checklist**

- [X] I've manually tested the PR (e.g. pull and build branch, run the
app, test code being changed).
- [X] 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]
> **Low Risk**
> Display-only activity fee labeling with shared sponsorship helper;
covered by unit tests and no payment or signing logic changes.
> 
> **Overview**
> Gas-sponsored swaps (e.g. Monad) were showing a calculated **network
fee** in Activity Details instead of **Paid by MetaMask**. This change
wires the same sponsorship rules used on the legacy transaction
breakdown into the activity fee pipeline.
> 
> Local activity items now attach a `gas-fee-sponsored` fee marker when
`isGasFeeSponsored` applies (with hardware wallets,
failed-without-receipt, revoke delegation, and rejected txs excluded).
When API-enriched activity replaces the local row,
`mergeActivityItemSponsoredFees` keeps that marker and drops the API’s
base network fee. **FeesRows** renders the sponsored type as **Paid by
MetaMask** via `SuccessPill`.
> 
> <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit
1800b9b. 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 July 24, 2026 10:19
@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.

@metamask-ci metamask-ci Bot added the team-bots Bot team (for MetaMask Bot, Runway Bot, etc.) label Jul 24, 2026
@sonarqubecloud

Copy link
Copy Markdown

@metamask-ci

metamask-ci Bot commented Jul 24, 2026

Copy link
Copy Markdown
Contributor
Builds ready [995de88]
Deprecated Browserify fallback builds
⚡ Performance Benchmarks (Total: 🟢 16 pass · 🟡 8 warn · 🔴 0 fail)

Baseline (latest main): 545dd73 | Date: 7/24/2026 | Pipeline: 30085773913 | Baseline logs

Interaction Benchmarks · Samples: 5
Benchmarkchrome-webpackfirefox-webpack
loadNewAccount
[Sentry log · main/release]
🟢 [CI log]🟢 [CI log]
confirmTx
[Sentry log · main/release]
🟢 [CI log]🟢 [CI log]
bridgeUserActions
[Sentry log · main/release]
🟢 [CI log]🟢 [CI log]
🔴 bridge_load_asset_picker

📈 Results compared to the previous 5 runs on main

  • ↓ loadNewAccount/load_new_account: -75%
  • ↓ loadNewAccount/total: -75%
  • ↓ loadNewAccount/inp: -24%
  • ↓ confirmTx/inp: -25%
  • ↑ bridgeUserActions/bridge_load_page: +24%
  • ↑ bridgeUserActions/bridge_load_asset_picker: +24%
  • ↑ bridgeUserActions/longTaskCount: +11%
  • ↑ bridgeUserActions/longTaskTotalDuration: +15%
  • ↑ bridgeUserActions/tbt: +25%
  • ↓ bridgeUserActions/inp: -24%
  • ↓ loadNewAccount/load_new_account: -71%
  • ↓ loadNewAccount/total: -71%
  • ↓ loadNewAccount/inp: -47%
  • ↓ loadNewAccount/fcp: -67%
  • ↑ loadNewAccount/lcp: +968%
  • ↓ confirmTx/longTaskCount: -100%
  • ↓ confirmTx/longTaskTotalDuration: -100%
  • ↓ confirmTx/longTaskMaxDuration: -100%
  • ↓ confirmTx/tbt: -100%
  • ↓ confirmTx/inp: -40%
  • ↓ confirmTx/fcp: -63%
  • ↑ confirmTx/lcp: +908%
  • ↑ bridgeUserActions/bridge_load_page: +156%
  • ↑ bridgeUserActions/bridge_load_asset_picker: +901%
  • ↓ bridgeUserActions/longTaskCount: -100%
  • ↓ bridgeUserActions/longTaskTotalDuration: -100%
  • ↓ bridgeUserActions/longTaskMaxDuration: -100%
  • ↓ bridgeUserActions/tbt: -100%
  • ↑ bridgeUserActions/total: +140%
  • ↓ bridgeUserActions/inp: -32%
  • ↓ bridgeUserActions/fcp: -72%
  • ↑ bridgeUserActions/lcp: +981%
Startup Benchmarks · Samples: 100
Benchmarkchrome-webpackfirefox-webpack
startupStandardHome
[Sentry log · main/release]
🟢 [CI log]🟢 [CI log]
startupPowerUserHome
[Sentry log · main/release]
–🟡 [CI log]

📈 Results compared to the previous 5 runs on main

  • ↑ startupStandardHome/uiStartup: +15%
  • ↑ startupStandardHome/load: +14%
  • ↑ startupStandardHome/domContentLoaded: +14%
  • ↑ startupStandardHome/domInteractive: +16%
  • ↑ startupStandardHome/backgroundConnect: +11%
  • ↑ startupStandardHome/firstReactRender: +19%
  • ↑ startupStandardHome/initialActions: +15%
  • ↑ startupStandardHome/loadScripts: +14%
  • ↑ startupStandardHome/setupStore: +52%
  • ↑ startupStandardHome/longTaskCount: +15%
  • ↑ startupStandardHome/longTaskTotalDuration: +18%
  • ↑ startupStandardHome/longTaskMaxDuration: +15%
  • ↑ startupStandardHome/tbt: +19%
  • ↑ startupStandardHome/fcp: +13%
  • ↓ startupStandardHome/lcp: -47%
  • ↑ startupStandardHome/uiStartup: +16%
  • ↑ startupStandardHome/load: +16%
  • ↑ startupStandardHome/domContentLoaded: +16%
  • ↓ startupStandardHome/domInteractive: -13%
  • ↑ startupStandardHome/firstReactRender: +20%
  • ↑ startupStandardHome/initialActions: +67%
  • ↑ startupStandardHome/loadScripts: +16%
  • ↓ startupStandardHome/fcp: -12%
  • ↑ startupStandardHome/lcp: +15%
  • ↑ startupPowerUserHome/uiStartup: +10%
  • ↑ startupPowerUserHome/load: +14%
  • ↑ startupPowerUserHome/domContentLoaded: +14%
  • ↑ startupPowerUserHome/loadScripts: +15%
  • ↑ startupPowerUserHome/setupStore: +20%

🌐 Core Web Vitals — 🟢 good · 🟡 needs improvement · 🔴 poor (web.dev thresholds)

  • 🟡 startupPowerUserHome/INP: p75 216ms
  • 🟡 startupPowerUserHome/LCP: p75 3.6s
User Journey Benchmarks · Samples: 5 · mock API
Benchmarkchrome-webpackfirefox-webpack
onboardingImportWallet
[Sentry log · main/release]
🟢 [CI log]🟢 [CI log]
onboardingNewWallet
[Sentry log · main/release]
🟢 [CI log]🟡 [CI log]
🟡 total
assetDetails
[Sentry log · main/release]
🟢 [CI log]🟡 [CI log]
solanaAssetDetails
[Sentry log · main/release]
🟢 [CI log]🟡 [CI log]
importSrpHome
[Sentry log · main/release]
🟡 [CI log]🟡 [CI log]
sendTransactions
[Sentry log · main/release]
🟢 [CI log]🟡 [CI log]
swap
[Sentry log · main/release]
🟢 [CI log]🟡 [CI log]

📈 Results compared to the previous 5 runs on main

  • ↓ onboardingImportWallet/metricsToWalletReadyScreen: -23%
  • ↓ onboardingImportWallet/doneButtonToHomeScreen: -90%
  • ↓ onboardingImportWallet/openAccountMenuToAccountListLoaded: -92%
  • ↓ onboardingImportWallet/longTaskCount: -87%
  • ↓ onboardingImportWallet/longTaskTotalDuration: -96%
  • ↓ onboardingImportWallet/longTaskMaxDuration: -92%
  • ↓ onboardingImportWallet/tbt: -100%
  • ↓ onboardingImportWallet/total: -89%
  • ↑ onboardingNewWallet/createPwToRecoveryScreen: +14%
  • ↑ onboardingNewWallet/skipBackupToMetricsScreen: +16%
  • ↑ onboardingNewWallet/agreeButtonToOnboardingSuccess: +15%
  • ↓ onboardingNewWallet/doneButtonToAssetList: -71%
  • ↓ onboardingNewWallet/longTaskCount: -64%
  • ↓ onboardingNewWallet/longTaskTotalDuration: -71%
  • ↓ onboardingNewWallet/longTaskMaxDuration: -38%
  • ↓ onboardingNewWallet/tbt: -84%
  • ↓ onboardingNewWallet/total: -67%
  • ↓ solanaAssetDetails/assetClickToPriceChart: -69%
  • ↓ solanaAssetDetails/total: -69%
  • ↓ solanaAssetDetails/inp: -25%
  • ↓ importSrpHome/loginToHomeScreen: -15%
  • ↓ importSrpHome/openAccountMenuAfterLogin: -95%
  • ↓ importSrpHome/homeAfterImportWithNewWallet: -84%
  • ↓ importSrpHome/longTaskCount: -64%
  • ↓ importSrpHome/longTaskTotalDuration: -53%
  • ↓ importSrpHome/longTaskMaxDuration: -16%
  • ↓ importSrpHome/tbt: -44%
  • ↓ importSrpHome/total: -81%
  • ↓ importSrpHome/inp: -23%
  • ↓ sendTransactions/openSendPageFromHome: -13%
  • ↓ sendTransactions/reviewTransactionToConfirmationPage: -97%
  • ↓ sendTransactions/longTaskCount: -100%
  • ↓ sendTransactions/longTaskTotalDuration: -100%
  • ↓ sendTransactions/longTaskMaxDuration: -100%
  • ↓ sendTransactions/tbt: -100%
  • ↓ sendTransactions/total: -95%
  • ↓ sendTransactions/inp: -25%
  • ↓ sendTransactions/cls: -17%
  • ↓ swap/openSwapPageFromHome: -19%
  • ↑ swap/fetchAndDisplaySwapQuotes: +123%
  • ↓ swap/longTaskTotalDuration: -11%
  • ↓ swap/tbt: -100%
  • ↑ swap/total: +121%
  • ↓ swap/inp: -22%
  • ↑ swap/lcp: +16%
  • ↓ swap/cls: -88%

🌐 Core Web Vitals — 🟢 good · 🟡 needs improvement · 🔴 poor (web.dev thresholds)

  • 🟡 importSrpHome/INP: p75 304ms
  • 🟡 assetDetails/FCP: p75 1.9s
  • 🟡 solanaAssetDetails/FCP: p75 1.9s
  • 🟡 importSrpHome/FCP: p75 2.0s
  • 🟡 sendTransactions/FCP: p75 2.0s
  • 🟡 swap/FCP: p75 2.0s
Dapp Page Load Benchmarks · Samples: 100
Benchmarkchrome-webpack
dappPageLoad
[Sentry log · main/release]
🟢 [CI log]
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 72 Bytes (0%)
  • ui: 11.9 KiB (0.07%)
  • common: 0 Bytes (0%)
  • other: 0 Bytes (0%)
  • contentScripts: 84 Bytes (0%)
  • zip: 1.77 KiB (0.01%)

@gabrieledm
gabrieledm enabled auto-merge (squash) July 24, 2026 12:02
@sleepytanya
sleepytanya disabled auto-merge July 24, 2026 13:58
@sleepytanya
sleepytanya merged commit 40376af into release/13.41.0 Jul 24, 2026
382 of 384 checks passed
@sleepytanya
sleepytanya deleted the runway-cherry-pick-13.41.0-1784888368 branch July 24, 2026 13:58
@github-actions github-actions Bot locked and limited conversation to collaborators Jul 24, 2026
@metamaskbot metamaskbot added the release-13.41.0 Issue or pull request that will be included in release 13.41.0 label Jul 27, 2026
@gauthierpetetin

Copy link
Copy Markdown
Contributor

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

This branch was previously deployed

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

Labels

release-13.41.0 Issue or pull request that will be included in release 13.41.0 risk:low team-bots Bot team (for MetaMask Bot, Runway Bot, etc.)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants