Skip to content

feat: add mUSD claim transaction type and related UI updates#25452

Merged
PatrykLucka merged 19 commits intomainfrom
MUSD-228-custom-transaction-type-for-merkl-yield-claiming
Feb 6, 2026
Merged

feat: add mUSD claim transaction type and related UI updates#25452
PatrykLucka merged 19 commits intomainfrom
MUSD-228-custom-transaction-type-for-merkl-yield-claiming

Conversation

@PatrykLucka
Copy link
Copy Markdown
Contributor

@PatrykLucka PatrykLucka commented Jan 30, 2026

Description

This PR adds comprehensive display support for TransactionType.musdClaim transactions (Merkl rewards claims) across the app. Previously, these transactions showed generic/empty information. Now users see meaningful details about their mUSD reward claims.

Changes include:

  • Transaction details view: Shows "Claimed mUSD" title with proper hero amount, summary, network fee, and received total
  • Activity list: Shows received icon with correct claimed amount and fiat value
  • Added musdClaim to appropriate type arrays for proper routing and display
  • Added localization strings for claim-related labels
  • Added unit tests for all new musdClaim handling

This PR also fixes an issue where two loading toasts appeared during a claim transaction. Now only one is shown.

Changelog

CHANGELOG entry: Added detailed transaction display for mUSD reward claims showing claimed amount, network fee, and received total

Related issues

Fixes: https://consensyssoftware.atlassian.net/browse/MUSD-228

Manual testing steps

Feature: mUSD Claim Transaction Display

  Scenario: User views mUSD claim in activity list
    Given user has completed a Merkl mUSD rewards claim transaction
    
    When user opens the Activity tab
    Then the transaction shows "Claim" label
    And displays the received icon (not generic contract icon)
    And shows the correct claimed mUSD amount and fiat value

  Scenario: User views mUSD claim transaction details
    Given user has completed a Merkl mUSD rewards claim transaction
    
    When user taps on the claim transaction in Activity
    Then the title shows "Claimed mUSD"
    And the hero section displays the claimed amount
    And the summary shows "Claim mUSD"
    And "Network fee" row displays the gas fee paid
    And "Received total" row displays the total claimed value

Screenshots/Recordings

Before

After

Screenshot 2026-01-30 at 17 42 27 Screenshot 2026-01-30 at 17 42 32

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

Medium Risk
Touches transaction classification, decoding, and multiple UI surfaces (activity list, token details, confirmations), so regressions could hide or mislabel transactions or show incorrect fiat amounts; changes are mostly additive with tests covering key paths.

Overview
Adds first-class support for Merkl mUSD reward claims by emitting transactions as TransactionType.musdClaim, detecting them in token activity filters, and decoding claim calldata to display claimed amount and fiat value in the activity list.

Updates the redesigned Transaction Details flow to handle musdClaim (hero amount, summary titles, network fee, received total) and introduces usePayFiatFormatter to show user-currency fiat for musdClaim while keeping other flows USD-default. Also adjusts navigation to the new details screen via a two-step route to avoid duplicate/toast/navigation issues, and adds localization + extensive unit test coverage for the new behavior.

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

@PatrykLucka PatrykLucka self-assigned this Jan 30, 2026
@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.

@PatrykLucka PatrykLucka force-pushed the MUSD-228-custom-transaction-type-for-merkl-yield-claiming branch from 0bda600 to 8ab35ae Compare January 30, 2026 17:02
@PatrykLucka PatrykLucka marked this pull request as ready for review January 30, 2026 17:17
@PatrykLucka PatrykLucka requested review from a team as code owners January 30, 2026 17:17
@PatrykLucka PatrykLucka force-pushed the MUSD-228-custom-transaction-type-for-merkl-yield-claiming branch from e5106d1 to 223fba7 Compare February 2, 2026 15:16
@PatrykLucka PatrykLucka force-pushed the MUSD-228-custom-transaction-type-for-merkl-yield-claiming branch from c366235 to 2d828b3 Compare February 3, 2026 15:21
matthewwalsh0
matthewwalsh0 previously approved these changes Feb 4, 2026
@PatrykLucka PatrykLucka force-pushed the MUSD-228-custom-transaction-type-for-merkl-yield-claiming branch from de861ab to b6e5a44 Compare February 4, 2026 15:11
wachunei
wachunei previously approved these changes Feb 4, 2026
Copy link
Copy Markdown
Contributor

@Matt561 Matt561 left a comment

Choose a reason for hiding this comment

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

@PatrykLucka I'm seeing the claim tx in the activity list but not on the Asset Overview screen for mUSD. Is this intentional?

Looks good 👍 - Just one comment about fiat amounts not converting based on the user's currency preference.

wachunei
wachunei previously approved these changes Feb 5, 2026
@PatrykLucka PatrykLucka dismissed stale reviews from wachunei, Matt561, and nickewansmith via cb0145b February 5, 2026 16:43
@github-actions github-actions bot added size-L and removed size-XL labels Feb 5, 2026
Copy link
Copy Markdown

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

Copy link
Copy Markdown

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

Copy link
Copy Markdown
Contributor

@nickewansmith nickewansmith left a comment

Choose a reason for hiding this comment

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

Should we use what is on main for package.json and yarn.lock if you have no need for package.json or yarn.lock changes?

@nickewansmith
Copy link
Copy Markdown
Contributor

Should we use what is on main for package.json and yarn.lock if you have no need for package.json or yarn.lock changes?

Discussed previous changes

@nickewansmith nickewansmith requested a review from a team February 5, 2026 18:15
@PatrykLucka
Copy link
Copy Markdown
Contributor Author

Adding skip-e2e, as the failing tests are also failing for other PRs, not related to changes in this one.

@PatrykLucka PatrykLucka added the skip-e2e skip E2E test jobs label Feb 5, 2026
@PatrykLucka PatrykLucka requested a review from wachunei February 5, 2026 18:16
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Feb 5, 2026

🔍 Smart E2E Test Selection

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

E2E Test Selection:
This PR adds support for a new transaction type TransactionType.musdClaim for claiming mUSD rewards from the Merkl distributor. The changes span multiple areas:

  1. Confirmations System (SmokeConfirmations): The PR modifies transaction details components (transaction-details.tsx, transaction-details-hero.tsx, transaction-details-summary.tsx, transaction-details-total-row.tsx, transaction-details-network-fee-row.tsx), adds the new type to REDESIGNED_TRANSACTION_TYPES, FULL_SCREEN_CONFIRMATIONS, and SUMMARY_SECTION_TYPES constants, and updates useTokenAmount.ts hook for decoding mUSD claim amounts.

  2. Wallet Platform/Activity (SmokeWalletPlatform): The PR modifies TransactionElement/index.js to handle the new transaction type in the activity list, including navigation changes (now navigates to TRANSACTIONS_VIEW first, then TRANSACTION_DETAILS after 100ms timeout). It also updates Asset/index.js to filter mUSD claim transactions for the token view, and adds useTokenTransactions.ts changes for transaction filtering.

  3. Package Update: The @metamask/transaction-controller is updated from a patched version to ^62.12.0/^62.14.0, which introduces the new TransactionType.musdClaim type.

  4. NotificationManager.js (critical file): Added musdClaim to SKIP_NOTIFICATION_TRANSACTION_TYPES to prevent notifications for this transaction type.

The changes are well-scoped to the Earn/mUSD feature and transaction display. While the package update could have broader implications, the changes are primarily additive (new transaction type support) rather than modifying existing behavior. The unit tests have been updated to cover the new functionality.

No need for SmokePerps or SmokePredictions as those are separate features. No need for SmokeAccounts, SmokeIdentity, or SmokeNetworkAbstractions as account management, sync, and network selection are not affected. No need for SmokeTrade as this is about claiming rewards, not swaps/bridges.

Performance Test Selection:
The changes are primarily about adding a new transaction type for mUSD claims. The modifications are to transaction display logic and filtering, not to core rendering performance, list rendering, or data loading patterns. The navigation change in TransactionElement (adding a 100ms timeout before navigating to transaction details) is a minor UX change, not a performance concern. No changes to account lists, network selectors, app startup, or critical performance paths that would warrant performance testing.

View GitHub Actions results

@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud bot commented Feb 5, 2026

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Minor, unit tests.

@PatrykLucka PatrykLucka enabled auto-merge February 6, 2026 09:02
@PatrykLucka PatrykLucka added this pull request to the merge queue Feb 6, 2026
Merged via the queue into main with commit 995cb84 Feb 6, 2026
230 of 236 checks passed
@PatrykLucka PatrykLucka deleted the MUSD-228-custom-transaction-type-for-merkl-yield-claiming branch February 6, 2026 11:37
@github-actions github-actions bot locked and limited conversation to collaborators Feb 6, 2026
@metamaskbot metamaskbot added the release-7.66.0 Issue or pull request that will be included in release 7.66.0 label Feb 6, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

release-7.66.0 Issue or pull request that will be included in release 7.66.0 size-L skip-e2e skip E2E test jobs team-earn

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants