Skip to content

Commit

Permalink
Merge pull request #384 from reservoirprotocol/fix/slippage-ui-bugs
Browse files Browse the repository at this point in the history
Fix slippage UI bugs
  • Loading branch information
pedromcunha authored Dec 4, 2024
2 parents 13eb4f7 + 3a71c56 commit 19763cb
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 3 deletions.
5 changes: 5 additions & 0 deletions .changeset/twenty-pets-love.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@reservoir0x/relay-kit-ui': patch
---

Fix slippage ui bugs
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,11 @@ export const ReviewQuoteStep: FC<ReviewQuoteProps> = ({

let breakdown: { title: string; value: ReactNode }[] = []

if (minimumAmountFormatted) {
if (
minimumAmountFormatted &&
quote?.details?.slippageTolerance?.destination?.percent &&
quote.details.slippageTolerance.destination.percent != '0.00'
) {
breakdown.push({
title: 'Min. Received',
value: (
Expand Down Expand Up @@ -150,7 +154,8 @@ export const ReviewQuoteStep: FC<ReviewQuoteProps> = ({
<Flex css={{ color: 'gray9' }}>
<FontAwesomeIcon
icon={faInfoCircle}
width={16}
width={14}
height={14}
style={{
display: 'inline-block'
}}
Expand Down Expand Up @@ -406,7 +411,11 @@ export const ReviewQuoteStep: FC<ReviewQuoteProps> = ({
align="center"
css={{ width: '100%', gap: '4' }}
>
<Text style="subtitle2" color="subtle">
<Text
style="subtitle2"
color="subtle"
css={{ alignSelf: 'flex-start' }}
>
{item.title}
</Text>
{isFetchingQuote ? (
Expand Down

0 comments on commit 19763cb

Please sign in to comment.