Skip to content

Commit 7bd4b42

Browse files
authored
fix(bridge): reorder minimum received row and fix quote card tooltip copy (#47642)
## **Description** Fixes three UI issues in the swaps/bridge quote card: 1. Moved the "Minimum received" row directly under "Slippage" and above "Price impact". 2. Fixed a typo in the "Price impact" tooltip: "availale liquidity" is now "available liquidity". 3. Changed the "Minimum received" tooltip header from "Minimum amount received" to "Minimum received", matching the row label. Copy changes are applied to `en` and `en_GB`; other locales will be picked up by translators. ## **Changelog** CHANGELOG entry: Fixed the order of the "Minimum received" row and typos in the swap quote card tooltips ## **Related issues** Fixes: [SWAPS-5007](https://consensyssoftware.atlassian.net/browse/SWAPS-5007) ## **Manual testing steps** 1. Run the extension and open Swap. 2. Select a source and destination token and enter an amount to fetch a quote. 3. In the quote card, verify the rows appear in the order: Slippage, Minimum received, Price impact. 4. Hover the "Price impact" info icon and verify the tooltip reads "available liquidity". 5. Hover the "Minimum received" info icon and verify the tooltip header reads "Minimum received". <!-- ## **Screenshots/Recordings** ### **Before** ### **After** --> ## **Pre-merge author checklist** - [x] I've followed [MetaMask Contributor Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask Extension Coding Standards](https://github.com/MetaMask/metamask-extension/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 - [ ] I’ve documented my code using [JSDoc](https://jsdoc.app/) format if applicable - [ ] I’ve applied the right labels on the PR (see [labeling guidelines](https://github.com/MetaMask/metamask-extension/blob/main/.github/guidelines/LABELING_GUIDELINES.md)). Not required for external contributors. ## **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. [SWAPS-5007]: https://consensyssoftware.atlassian.net/browse/SWAPS-5007?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ <!-- CURSOR_SUMMARY --> --- > [!NOTE] > **Low Risk** > Presentation-only changes to quote card row order and localized strings, with no logic or transaction-handling impact. > > **Overview** > Reorders the multichain bridge quote details so **Minimum received** sits directly under **Slippage** and above **Price impact**, matching the intended layout (snapshot test updated). > > Updates English copy: fixes the price-impact tooltip typo **availale → available liquidity**, and shortens the minimum-received tooltip title from **Minimum amount received** to **Minimum received** so it matches the row label (`en` and `en_GB`). > > <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit 4885997. Bugbot is set up for automated code reviews on this repo. Configure [here](https://www.cursor.com/dashboard/bugbot).</sup> <!-- /CURSOR_SUMMARY -->
1 parent 0190053 commit 7bd4b42

4 files changed

Lines changed: 25 additions & 25 deletions

File tree

‎app/_locales/en/messages.json‎

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎app/_locales/en_GB/messages.json‎

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎ui/pages/bridge/quotes/__snapshots__/multichain-bridge-quote-card.test.tsx.snap‎

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -766,9 +766,9 @@ exports[`MultichainBridgeQuoteCard should render the recommended quote while loa
766766
class="mm-box mm-container mm-container--max-width-undefined mm-box--display-flex mm-box--gap-2 mm-box--flex-direction-row mm-box--flex-wrap-nowrap mm-box--justify-content-space-between mm-box--align-items-center"
767767
>
768768
<p
769-
class="text-alternative text-s-body-sm leading-s-body-sm tracking-s-body-sm md:text-l-body-sm md:leading-l-body-sm md:tracking-l-body-sm font-regular font-default"
769+
class="mm-box mm-text mm-text--body-sm mm-box--color-text-alternative"
770770
>
771-
Price impact
771+
Minimum received
772772
</p>
773773
<div
774774
class=""
@@ -783,15 +783,12 @@ exports[`MultichainBridgeQuoteCard should render the recommended quote while loa
783783
</div>
784784
</div>
785785
</div>
786-
<div
787-
class="mm-box mm-container mm-container--max-width-undefined mm-box--display-flex mm-box--gap-1 mm-box--flex-direction-row mm-box--flex-wrap-nowrap mm-box--justify-content-space-between mm-box--align-items-center"
786+
<p
787+
class="mm-box mm-text mm-text--body-sm mm-box--color-text-alternative"
788+
data-testid="minimum-received"
788789
>
789-
<p
790-
class="text-alternative text-s-body-sm leading-s-body-sm tracking-s-body-sm md:text-l-body-sm md:leading-l-body-sm md:tracking-l-body-sm font-regular font-default"
791-
>
792-
2.0%
793-
</p>
794-
</div>
790+
14.44 USDC
791+
</p>
795792
</div>
796793
<div
797794
class="mm-box mm-container mm-container--max-width-undefined mm-box--display-flex mm-box--flex-direction-row mm-box--flex-wrap-nowrap mm-box--justify-content-space-between mm-box--align-items-center"
@@ -800,9 +797,9 @@ exports[`MultichainBridgeQuoteCard should render the recommended quote while loa
800797
class="mm-box mm-container mm-container--max-width-undefined mm-box--display-flex mm-box--gap-2 mm-box--flex-direction-row mm-box--flex-wrap-nowrap mm-box--justify-content-space-between mm-box--align-items-center"
801798
>
802799
<p
803-
class="mm-box mm-text mm-text--body-sm mm-box--color-text-alternative"
800+
class="text-alternative text-s-body-sm leading-s-body-sm tracking-s-body-sm md:text-l-body-sm md:leading-l-body-sm md:tracking-l-body-sm font-regular font-default"
804801
>
805-
Minimum received
802+
Price impact
806803
</p>
807804
<div
808805
class=""
@@ -817,12 +814,15 @@ exports[`MultichainBridgeQuoteCard should render the recommended quote while loa
817814
</div>
818815
</div>
819816
</div>
820-
<p
821-
class="mm-box mm-text mm-text--body-sm mm-box--color-text-alternative"
822-
data-testid="minimum-received"
817+
<div
818+
class="mm-box mm-container mm-container--max-width-undefined mm-box--display-flex mm-box--gap-1 mm-box--flex-direction-row mm-box--flex-wrap-nowrap mm-box--justify-content-space-between mm-box--align-items-center"
823819
>
824-
14.44 USDC
825-
</p>
820+
<p
821+
class="text-alternative text-s-body-sm leading-s-body-sm tracking-s-body-sm md:text-l-body-sm md:leading-l-body-sm md:tracking-l-body-sm font-regular font-default"
822+
>
823+
2.0%
824+
</p>
825+
</div>
826826
</div>
827827
</div>
828828
</div>

‎ui/pages/bridge/quotes/multichain-bridge-quote-card.tsx‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -424,10 +424,6 @@ export const MultichainBridgeQuoteCard = ({
424424
</Row>
425425
</Row>
426426

427-
<PriceImpactQuoteDetailsRow
428-
onOpenPriceImpactWarningModal={onOpenPriceImpactWarningModal}
429-
/>
430-
431427
{/* Minimum Received */}
432428
{activeQuote.quote.dest?.minAmountNormalized && (
433429
<Row justifyContent={JustifyContent.spaceBetween}>
@@ -461,6 +457,10 @@ export const MultichainBridgeQuoteCard = ({
461457
</Row>
462458
)}
463459

460+
<PriceImpactQuoteDetailsRow
461+
onOpenPriceImpactWarningModal={onOpenPriceImpactWarningModal}
462+
/>
463+
464464
{/* Recipient */}
465465
{isCrossChainBridge && selectedDestinationAccount && (
466466
<Row justifyContent={JustifyContent.spaceBetween}>

0 commit comments

Comments
 (0)