Skip to content

feat: MUSD-150 quick convert (Part 3)#26638

Merged
Matt561 merged 22 commits into
mainfrom
feat/musd-150-quick-convert-part-3
Mar 2, 2026
Merged

feat: MUSD-150 quick convert (Part 3)#26638
Matt561 merged 22 commits into
mainfrom
feat/musd-150-quick-convert-part-3

Conversation

@Matt561

@Matt561 Matt561 commented Feb 26, 2026

Copy link
Copy Markdown
Contributor

Description

The third and final Quick Convert foundational PR. This adds the mUSD Max conversion bottom sheet and mUSD conversion info root which routes to either quick convert or custom convert based on the forceBottomSheet route param.

Changelog

CHANGELOG entry: mUSD quick convert (part 3) adding max convert bottom sheet

Related issues

Fixes:

Manual testing steps

Feature: mUSD max conversion confirmation

  Scenario: user reviews and confirms max conversion
    Given user opens mUSD quick convert with max amount confirmation
    When user views the confirmation sheet
    Then user sees "Convert max" details and can tap "Convert"

  Scenario: user is blocked when conversion cannot proceed
    Given user opens mUSD max conversion confirmation
    When a blocking condition exists (for example no quote or insufficient network gas token)
    Then the confirm action is disabled and a blocking alert message is shown

Screenshots/Recordings

Before

After

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 confirmation UI/flow for TransactionType.musdConversion, including confirm enablement/labeling based on quotes and blocking alerts. Risk is moderate because regressions could prevent users from confirming conversions or hide required warnings.

Overview
Adds a new mUSD max-conversion confirmation UI. Introduces MusdMaxConversionInfo (asset header + rate/fee/total/percentage rows) and a new MusdConversionInfoRoot that routes between the existing conversion view and the new max-convert bottom sheet based on the forceBottomSheet nav param.

Improves blocking-alert UX in confirmations. Adds reusable BlockingAlertMessage to render the first blocking alert’s message and updates the max-convert confirm button to disable when loading or blocked and to use the blocking alert title as the button label.

Polishes related confirmation wiring/tests. Updates the confirmation title for musdConversion to “Convert max”, adds a TokenConversionRateRow, adjusts Footer QR hardware context import and removes unused confirmDisabled styling param, and adds/updates unit tests and locale strings accordingly.

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

@Matt561 Matt561 requested a review from a team as a code owner February 26, 2026 17:19
@Matt561 Matt561 added No QA Needed Apply this label when your PR does not need any QA effort. team-earn labels Feb 26, 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.

Comment thread app/components/Views/confirmations/components/title/title.test.tsx Outdated
style={styles.container}
testID={MusdMaxConversionInfoTestIds.CONTAINER}
>
<MusdMaxConversionAssetHeader

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 not rely on the standard Title component in all the confirmations?

Is this conceptually a row in which case could we rename and move to the rows directory?

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.

Here's what this component looks like. It's not really a row but meant to be used as a header. I'll see if there's a better place for this to live.

image

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.

@matthewwalsh0 I've refactored this component to make it more reusable and have moved it out of the musd-conversion namespace.

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.

I feel "Row" has become a very lose definition to meaning a rendering of data inside a confirmation, so no specific rules on what it looks like.

Apologies for the confusion, I don't have a problem if it's MUSD specific, but great if we've made it more generic.

My only preference now would be to remove the props from info so it locates the tokens itself.

So you for example make a MUSD specific row component that wraps the new generic one?

Comment thread app/components/Views/confirmations/components/footer/footer.tsx
Comment thread locales/languages/en.json Outdated

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

@matthewwalsh0 matthewwalsh0 left a comment

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.

Nothing really blocking, just some architecture preferences to favour modular components that retrieve their own data.

We can hopefully address in future, don't want to excessively delay this.

Appreciate the work done on creating the rate row and alert components! ❤️

</View>
<BlockingAlertMessage />
<View style={styles.buttonContainer}>
<Button

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.

Agree we can abstract this later if needed, but maybe just a local ConfirmButton in the same file so you can encapsulate more of the logic to minimise any code in the info component itself?

testID={MusdMaxConversionInfoTestIds.CONTAINER}
>
<TokenConversionAssetHeader
inputToken={token}

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.

Same here, if this asset header is unique to this use case, could we encapsulate data retrieval in there?

style={styles.container}
testID={MusdMaxConversionInfoTestIds.CONTAINER}
>
<MusdMaxConversionAssetHeader

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.

I feel "Row" has become a very lose definition to meaning a rendering of data inside a confirmation, so no specific rules on what it looks like.

Apologies for the confusion, I don't have a problem if it's MUSD specific, but great if we've made it more generic.

My only preference now would be to remove the props from info so it locates the tokens itself.

So you for example make a MUSD specific row component that wraps the new generic one?

@Matt561 Matt561 enabled auto-merge March 2, 2026 22:09
@github-actions

github-actions Bot commented Mar 2, 2026

Copy link
Copy Markdown
Contributor

🔍 Smart E2E Test Selection

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

E2E Test Selection:
This PR adds new components and modifies existing ones in the confirmations system, specifically for mUSD (MetaMask USD) conversion functionality:

New Components Added:

  1. BlockingAlertMessage - Displays blocking alert messages in confirmations
  2. MusdConversionInfoRoot - Root component that conditionally renders mUSD conversion info based on forceBottomSheet param
  3. MusdMaxConversionInfo - New confirmation info component for max mUSD conversion with its own confirm button
  4. TokenConversionRateRow - Shows token conversion rates
  5. TokenConversionAssetHeader - Shows input/output token info with network badges

Modified Components:

  1. footer.tsx - Minor refactor: removed confirmDisabled variable and changed import path for useQRHardwareContext (from direct path to index.ts)
  2. info-root.tsx - Changed to use MusdConversionInfoRoot instead of MusdConversionInfo directly
  3. title.tsx - Added title handling for musdConversion transaction type

Why SmokeConfirmations:

  • All changes are within app/components/Views/confirmations/ directory
  • The changes affect the confirmation UI system for mUSD conversion transactions
  • The footer.tsx modification is a minor refactor but still touches the confirmation footer component
  • The info-root.tsx change affects how mUSD conversion confirmations are rendered

Why not other tags:

  • No changes to account management (SmokeAccounts)
  • No changes to network management (SmokeNetworkAbstractions/SmokeNetworkExpansion)
  • No changes to trading flows outside confirmations (SmokeTrade)
  • No changes to Snaps functionality (FlaskBuildTests)
  • No changes to identity/sync features (SmokeIdentity)
  • No changes to ramps, card, perps, predictions, or multi-chain API

Performance Test Selection:
The changes are focused on adding new UI components for mUSD conversion confirmations. These are new feature components that don't modify existing performance-critical paths like app launch, login, account list rendering, or swap flows. The changes add new confirmation info views and rows but don't affect the core rendering performance of existing features. No performance tests are needed as this is primarily new feature code rather than modifications to performance-sensitive areas.

View GitHub Actions results

@github-actions

github-actions Bot commented Mar 2, 2026

Copy link
Copy Markdown
Contributor

⚠️ E2E Fixture Validation — Structural changes detected

Category Count
New keys 60
Missing keys 0
Type mismatches 0
Value mismatches 7 (informational)

The committed fixture schema is out of date. To update, comment:

@metamaskbot update-mobile-fixture

View full details | Download diff report

@Matt561 Matt561 added this pull request to the merge queue Mar 2, 2026
Merged via the queue into main with commit 63e126e Mar 2, 2026
95 of 96 checks passed
@Matt561 Matt561 deleted the feat/musd-150-quick-convert-part-3 branch March 2, 2026 22:58
@github-actions github-actions Bot locked and limited conversation to collaborators Mar 2, 2026
@metamaskbot metamaskbot added the release-7.69.0 Issue or pull request that will be included in release 7.69.0 label Mar 2, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

No QA Needed Apply this label when your PR does not need any QA effort. release-7.69.0 Issue or pull request that will be included in release 7.69.0 size-XL team-earn

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants