Cherry-picking commits from main to release/8.0.0 for PR #32096#32106
Open
runway-github[bot] wants to merge 1 commit into
Open
Cherry-picking commits from main to release/8.0.0 for PR #32096#32106runway-github[bot] wants to merge 1 commit into
runway-github[bot] wants to merge 1 commit into
Conversation
…by metamask cp-8.0.0 (#32096) ## **Description** Fixes a bug where the "Paid by MetaMask" label was incorrectly shown on the transaction details fee section for Money Account deposits that had a non-zero bridge/service fee. The `isSponsored` condition in `TransactionDetailsFeeSection` only checked whether the network (gas) fee was zero, ignoring the bridge fee entirely. This caused the fee section to collapse into a single "Paid by MetaMask" row even when the user was still charged a bridge fee (e.g. $0.89), hiding the real cost while the Total row still reflected it. The fix aligns the activity view with the confirmation screen's contract (`useIsPaidByMetaMask`): the unified "Paid by MetaMask" row now only renders when **both** the network fee and the bridge fee are zero. When gas is sponsored but a bridge fee is charged, the individual fee rows render with their real amounts instead. ## **Changelog** CHANGELOG entry: Fixed a bug where "Paid by MetaMask" was incorrectly displayed on transaction details when a bridge fee was still charged ## **Related issues** Fixes: Follow-up to #31908 ## **Manual testing steps** ```gherkin Feature: Transaction Details Fee Section - Paid by MetaMask Scenario: Fully sponsored deposit shows "Paid by MetaMask" Given I have completed a Money Account deposit where both network and bridge fees are zero When I view the transaction details from the Money Account activity list Then I see a single "Transaction fees" row showing "Paid by MetaMask" with a green checkmark Scenario: Partially sponsored deposit shows individual fee rows Given I have completed a Convert Crypto deposit where gas was sponsored but a bridge fee was charged When I view the transaction details from the Money Account activity list Then I see a "Network fee" row showing "$0.00" And I see a "Bridge fee" row showing the actual bridge fee amount (e.g. "$0.89") And I do NOT see "Paid by MetaMask" And the "Total" row correctly reflects the deposit amount plus the bridge fee ``` ## **Screenshots/Recordings** ### **Before** <img width="452" height="966" alt="Screenshot 2026-06-19 at 16 37 23" src="https://github.com/user-attachments/assets/dc735813-3be3-46e8-871c-d8f254990b6b" /> ### **After** <img width="439" height="955" alt="Screenshot 2026-06-19 at 17 00 06" src="https://github.com/user-attachments/assets/a0644ca6-3c09-4599-a1a2-a1b02830162c" /> ## **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. #### Performance checks (if applicable) - [ ] I've tested on Android - Ideally on a mid-range device; emulator is acceptable - [ ] I've tested with a power user scenario - Use these [power-user SRPs](https://consensyssoftware.atlassian.net/wiki/spaces/TL1/pages/edit-v2/401401446401?draftShareId=9d77e1e1-4bdc-4be1-9ebb-ccd916988d93) to import wallets with many accounts and tokens - [ ] I've instrumented key operations with Sentry traces for production performance metrics - See [`trace()`](/app/util/trace.ts) for usage and [`addToken`](/app/components/Views/AddAsset/components/AddCustomToken/AddCustomToken.tsx#L274) for an example For performance guidelines and tooling, see the [Performance Guide](https://consensyssoftware.atlassian.net/wiki/spaces/TL1/pages/400085549067/Performance+Guide+for+Engineers). ## **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.
Contributor
🔍 Smart E2E Test Selection⏭️ Smart E2E selection skipped - PR targets a release or stable branch (release/* or stable) All E2E tests pre-selected. |
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Description
Fixes a bug where the "Paid by MetaMask" label was incorrectly shown on
the transaction details fee section for Money Account deposits that had
a non-zero bridge/service fee.
The
isSponsoredcondition inTransactionDetailsFeeSectiononlychecked whether the network (gas) fee was zero, ignoring the bridge fee
entirely. This caused the fee section to collapse into a single "Paid by
MetaMask" row even when the user was still charged a bridge fee (e.g.
$0.89), hiding the real cost while the Total row still reflected it.
The fix aligns the activity view with the confirmation screen's contract
(
useIsPaidByMetaMask): the unified "Paid by MetaMask" row now onlyrenders when both the network fee and the bridge fee are zero. When
gas is sponsored but a bridge fee is charged, the individual fee rows
render with their real amounts instead.
Changelog
CHANGELOG entry: Fixed a bug where "Paid by MetaMask" was incorrectly
displayed on transaction details when a bridge fee was still charged
Related issues
Fixes: Follow-up to #31908
Manual testing steps
Screenshots/Recordings
Before
After
Pre-merge author checklist
Docs and MetaMask Mobile
Coding
Standards.
if applicable
guidelines).
Not required for external contributors.
Performance checks (if applicable)
SRPs
to import wallets with many accounts and tokens
performance metrics
trace()for usage andaddTokenfor an example
For performance guidelines and tooling, see the Performance
Guide.
Pre-merge reviewer checklist
app, test code being changed).
in the ticket it closes and includes the necessary testing evidence such
as recordings and or screenshots. 20fd0e1