Skip to content

feat: batch sell quote details and final review modal#30157

Merged
infiniteflower merged 8 commits into
mainfrom
swaps-4439-batchSell-quotes-3
May 20, 2026
Merged

feat: batch sell quote details and final review modal#30157
infiniteflower merged 8 commits into
mainfrom
swaps-4439-batchSell-quotes-3

Conversation

@infiniteflower

@infiniteflower infiniteflower commented May 13, 2026

Copy link
Copy Markdown
Contributor

Description

Adds the next Batch Sell review flow: the final review, and supporting info modals.

This introduces reusable quote-detail UI, skeleton states for quote-dependent values, modal-to-modal replacement behavior for bottom sheets, and Redux state for Batch Sell destination tokens and per-token slippage. The final review modal now supports collapsible token quote details, minimum received and network fee explanations, and placeholder quote values while quote fetching is still being wired.

Changelog

CHANGELOG entry: Added Batch Sell review controls, quote detail modals, and final review flow

Related issues

Related: SWAPS-4439

Manual testing steps

Feature: Batch Sell quote review flow

  Scenario: user reviews selected Batch Sell tokens before submitting
    Given MM_BATCH_SELL_ENABLED is true
    And swaps are active
    And the wallet has eligible non-stablecoin tokens on a supported Batch Sell network

    When user opens Batch Sell
    And user selects multiple eligible tokens from the same network
    And user taps Continue
    Then the Batch Sell Review screen is displayed
    And each selected token has a percentage slider
    And the destination stablecoin pill is displayed

    When user taps the Total received info icon
    Then the quote details modal is displayed
    And token quote rows, Total received, and Minimum received are shown

  Scenario: user opens explanatory modals from quote review
    Given user is viewing quote details or final review

    When user taps the Minimum received info icon
    Then the Minimum received info modal is displayed
    And tapping Back returns to the source modal

    When user taps the Network fee info icon from final review
    Then the Network fee info modal is displayed
    And tapping Back returns to the final review modal

  Scenario: user opens final review
    Given user is on the Batch Sell Review screen

    When user taps Review
    Then the Batch Sell final review modal is displayed
    And the You sell section shows selected token avatars and token count

    When user taps the You sell row
    Then token quote rows collapse
    And Total received and Minimum received remain visible

Screenshots/Recordings

Before

N/A

After

Screen.Recording.2026-05-15.at.11.24.48.AM.mov

Pre-merge author checklist

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 to import wallets with many accounts and tokens
  • I've instrumented key operations with Sentry traces for production performance metrics

For performance guidelines and tooling, see the Performance Guide.

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
Adds new Batch Sell review/navigation flows across multiple bottom-sheet modals and updates navigation route typing; risk is mainly in UI navigation/params wiring and placeholder quote/slippage display logic.

Overview
Batch Sell review flow now includes quote-details + final review modals. The BatchSellReview screen adds an info-button that opens a new quote details sheet and wires the Review button to open a new final review sheet, passing placeholder quote/fee values and per-token slippage display formatting.

Adds reusable BatchSellQuoteDetails UI (with loading skeletons and a Minimum received info action), a BatchSellFinalReviewModal with collapsible token rows plus network fee + MetaMask fee disclosure, and two new info sheets for Minimum received and Network fee with back-navigation via navigation.replace.

Registers the new modals in Bridge routes, adds new route constants and navigation param typings, renames slippage helper to getBatchSellSlippage and adds getSlippageDisplayValue, and updates/extends tests and English strings accordingly.

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

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

@metamaskbotv2 metamaskbotv2 Bot added the team-swaps-and-bridge Swaps and Bridge team label May 13, 2026
@infiniteflower infiniteflower changed the title feat: (1st commit) quote details modal ui only feat: batch sell quote details and final review modal May 14, 2026
@github-actions github-actions Bot added size-XL and removed size-L labels May 14, 2026
@infiniteflower infiniteflower force-pushed the swaps-4439-batchSell-quotes-2 branch from 554f2ae to 13c94fd Compare May 15, 2026 17:46
@infiniteflower infiniteflower force-pushed the swaps-4439-batchSell-quotes-3 branch from 4791df6 to a9b5221 Compare May 15, 2026 17:48
@infiniteflower infiniteflower force-pushed the swaps-4439-batchSell-quotes-2 branch from 6182d23 to b54c57f Compare May 15, 2026 20:36
@infiniteflower infiniteflower force-pushed the swaps-4439-batchSell-quotes-3 branch from a9b5221 to 14991d2 Compare May 15, 2026 20:50
Base automatically changed from swaps-4439-batchSell-quotes-2 to main May 19, 2026 15:02
@infiniteflower infiniteflower force-pushed the swaps-4439-batchSell-quotes-3 branch from 326a6bf to 5654ec1 Compare May 19, 2026 15:56
@infiniteflower infiniteflower marked this pull request as ready for review May 19, 2026 15:58
@infiniteflower infiniteflower requested review from a team as code owners May 19, 2026 15:58
@github-actions

Copy link
Copy Markdown
Contributor

🔍 Smart E2E Test Selection

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

E2E Test Selection:
The PR introduces new BatchSell UI components for the Bridge/Swap flow: BatchSellFinalReviewModal, BatchSellQuoteDetailsModal, BatchSellNetworkFeeInfoModal, and BatchSellMinimumReceivedInfoModal. Key changes include:

  1. New modal components (4 new files) - These are new bottom sheet modals for the batch sell review flow, wired into the Bridge modal stack navigation.

  2. BatchSellReview.tsx - The HAS_QUOTES flag changed from false to true, which enables the Review button and makes the batch sell flow functional. Navigation handlers added to open the new modals.

  3. Routes.ts & NavigationService/types.ts - 4 new route constants added (additive, non-breaking changes to navigation).

  4. SlippageModal/utils.ts - Function renamed from getBatchSellInitialSlippage to getBatchSellSlippage and new getSlippageDisplayValue helper added.

  5. locales/en.json - New i18n strings for batch sell UI elements.

No existing E2E tests specifically cover BatchSell flows. The changes are contained within the Bridge/Swap UI domain. Per tag descriptions, SmokeSwap covers bridge/swap flows and SmokeConfirmations should be included alongside SmokeSwap as transaction confirmations are part of the flow. The NavigationService/types.ts change is flagged as critical but the changes are purely additive type declarations for new routes - no breaking changes to existing navigation.

Performance Test Selection:
No performance-sensitive changes detected. The PR adds new UI modal components for the BatchSell flow, updates navigation routes, and adds i18n strings. There are no changes to list rendering performance, state management, app startup, account/network selectors, or other performance-critical paths. The new modals are simple bottom sheets with static content.

View GitHub Actions results

@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 5654ec1. Configure here.

Comment thread app/components/UI/Bridge/Views/BatchSellReview/BatchSellReview.tsx
Comment thread locales/languages/en.json
@sonarqubecloud

Copy link
Copy Markdown

@infiniteflower infiniteflower added this pull request to the merge queue May 20, 2026
Merged via the queue into main with commit 9a2f421 May 20, 2026
239 of 293 checks passed
@infiniteflower infiniteflower deleted the swaps-4439-batchSell-quotes-3 branch May 20, 2026 15:20
@github-actions github-actions Bot locked and limited conversation to collaborators May 20, 2026
@metamaskbotv2 metamaskbotv2 Bot added the release-7.79.0 Issue or pull request that will be included in release 7.79.0 label May 20, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

release-7.79.0 Issue or pull request that will be included in release 7.79.0 size-XL team-swaps-and-bridge Swaps and Bridge team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants