Skip to content

fix: musd deposit page for new MM Pay designs cp-7.74.0#28654

Merged
jpuri merged 6 commits into
mainfrom
much_deposit_fix
Apr 13, 2026
Merged

fix: musd deposit page for new MM Pay designs cp-7.74.0#28654
jpuri merged 6 commits into
mainfrom
much_deposit_fix

Conversation

@jpuri

@jpuri jpuri commented Apr 10, 2026

Copy link
Copy Markdown
Contributor

Description

Fix design of mush deposit page.

Changelog

CHANGELOG entry:

Related issues

Fixes: https://consensyssoftware.atlassian.net/browse/CONF-1173

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]

Screenshots/Recordings

Screenshot 2026-04-10 at 4 22 11 PM

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
Low risk UI/prop change limited to the confirmations custom amount view and mUSD conversion flow; main risk is unintended layout/row visibility regressions when hidePayTokenAmount is enabled.

Overview
Updates CustomAmountInfo to remove overrideContent and introduce hidePayTokenAmount, which hides the default PayTokenAmount (and the associated extra content block) while keeping PayWithRow rendering logic consistent.

Simplifies MusdConversionInfo by deleting the bespoke override UI (output tag + embedded PayWithRow) and instead passing hidePayTokenAmount to CustomAmountInfo; tests are updated accordingly.

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

@jpuri jpuri requested a review from a team as a code owner April 10, 2026 11:01
@jpuri jpuri added team-confirmations Push issues to confirmations team no-changelog no-changelog Indicates no external facing user changes, therefore no changelog documentation needed labels Apr 10, 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.

@jpuri jpuri changed the title fix: musd deposit page for new MM Pay designs fix: musd deposit page for new MM Pay designs cp-7.74.0 Apr 10, 2026
@github-actions github-actions Bot added the risk-medium Moderate testing recommended · Possible bug introduction risk label Apr 10, 2026
@jpuri jpuri enabled auto-merge April 10, 2026 11:03
@github-actions github-actions Bot added risk-medium Moderate testing recommended · Possible bug introduction risk and removed risk-medium Moderate testing recommended · Possible bug introduction risk labels Apr 10, 2026
(amountHuman: string) => <MusdOverrideContent amountHuman={amountHuman} />,
[],
);
const renderOverrideContent = useCallback(() => null, []);

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.

Can we remove this if we don't render anything?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This is used in <CustomAmountInfo in couple of places and can not be removed.

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.

Isn't this an optional value? Not asking to remove functionality but removing prop below.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

It is used at couple of decision points in CustomAmountInfo and we have removed only 1. The value is used in CustomAmountInfo and not possible to remove.

@OGPoyraz OGPoyraz Apr 10, 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.

@jpuri I am not asking to remove it from CustomAmountInfo, my question is remove using empty callback. MusdConversionInfo component can return as below and it won't cause any issue, meaning
const renderOverrideContent = useCallback(() => null, []); can be removed.

return (
    <CustomAmountInfo
      preferredToken={preferredPaymentToken}
      hasMax
      onAmountSubmit={startQuoteTrace}
    />
  );

@jpuri jpuri Apr 10, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Yes it can not be removed, as it is used at couple of places in CustomAmountInfo, not for rendering but more as boolean check to see if it is defined.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I replaced by a boolean prop hidePayTokenAmount

@@ -1,46 +1,16 @@
import React, { useCallback, useEffect } from 'react';
import { useParams } from '../../../../../../util/navigation/navUtils';
import OutputAmountTag from '../../../../../UI/Earn/components/OutputAmountTag';

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.

Can we also remove this component entirely?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

We do not own it, I would avoid removing it.

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.

No point of leaving dead code either. Can you create a follow up task for them then?

@OGPoyraz OGPoyraz Apr 10, 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.

Can you push the task here for reference?
Related thread of confirmation from PMs: https://consensys.slack.com/archives/C0A917EJME0/p1775819724642599?thread_ts=1775767602.266489&cid=C0A917EJME0

@jpuri jpuri requested a review from OGPoyraz April 10, 2026 11:56
(amountHuman: string) => <MusdOverrideContent amountHuman={amountHuman} />,
[],
);
const renderOverrideContent = useCallback(() => null, []);

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.

Isn't this an optional value? Not asking to remove functionality but removing prop below.

@@ -1,46 +1,16 @@
import React, { useCallback, useEffect } from 'react';
import { useParams } from '../../../../../../util/navigation/navUtils';
import OutputAmountTag from '../../../../../UI/Earn/components/OutputAmountTag';

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.

No point of leaving dead code either. Can you create a follow up task for them then?

@jpuri jpuri requested a review from OGPoyraz April 10, 2026 12:01

@cursor cursor Bot left a comment

Copy link
Copy Markdown
Contributor

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 2 potential issues.

Fix All in Cursor

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

Reviewed by Cursor Bugbot for commit 7fe90fb. Configure here.

OGPoyraz
OGPoyraz previously approved these changes Apr 13, 2026
@jpuri jpuri requested a review from OGPoyraz April 13, 2026 09:21
@github-actions github-actions Bot added size-M risk-medium Moderate testing recommended · Possible bug introduction risk and removed size-S risk-medium Moderate testing recommended · Possible bug introduction risk labels Apr 13, 2026
@github-actions github-actions Bot removed the risk-medium Moderate testing recommended · Possible bug introduction risk label Apr 13, 2026
@github-actions github-actions Bot added the risk-medium Moderate testing recommended · Possible bug introduction risk label Apr 13, 2026
@github-actions

Copy link
Copy Markdown
Contributor

🔍 Smart E2E Test Selection

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

E2E Test Selection:
The changes refactor the CustomAmountInfo component's API: replacing the overrideContent render-function prop with a simpler boolean hidePayTokenAmount prop. The MusdConversionInfo component is updated to use the new API.

Key impacts:

  1. SmokeConfirmations: CustomAmountInfo is a shared component used across multiple confirmation info screens (perps-deposit, perps-withdraw, predict-deposit, predict-withdraw, money-account-deposit, money-account-withdraw, musd-conversion). The PayWithRow rendering logic was reorganized (moved outside the conditional block), which could subtly affect behavior across all consumers.
  2. SmokePerps: perps-deposit-info and perps-withdraw-info both use CustomAmountInfo and could be affected by the PayWithRow logic reorganization.
  3. SmokePredictions: predict-deposit-info and predict-withdraw-info both use CustomAmountInfo and could be affected similarly.
  4. SmokeWalletPlatform: Required as a dependent tag when selecting SmokePerps and SmokePredictions (Perps and Predictions are sections inside the Trending tab).

The changes are unit-tested and the refactoring is straightforward, but the shared nature of CustomAmountInfo across multiple financial flows warrants validation of all affected flows.

Performance Test Selection:
The changes are a UI component API refactoring (replacing a render-function prop with a boolean prop) with no performance implications. No new rendering logic, data fetching, or state management changes were introduced that would affect app performance metrics.

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

@jpuri jpuri added this pull request to the merge queue Apr 13, 2026
Merged via the queue into main with commit f1be502 Apr 13, 2026
103 checks passed
@jpuri jpuri deleted the much_deposit_fix branch April 13, 2026 10:30
@github-actions github-actions Bot locked and limited conversation to collaborators Apr 13, 2026
@metamaskbot metamaskbot added the release-7.74.0 Issue or pull request that will be included in release 7.74.0 label Apr 13, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

no-changelog no-changelog Indicates no external facing user changes, therefore no changelog documentation needed release-7.74.0 Issue or pull request that will be included in release 7.74.0 risk-medium Moderate testing recommended · Possible bug introduction risk size-M team-confirmations Push issues to confirmations team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants