Skip to content

Commit

Permalink
Merge pull request #367 from reservoirprotocol/fix/high-price-impact-…
Browse files Browse the repository at this point in the history
…warning

Fix high price impact warning
  • Loading branch information
pedromcunha authored Nov 12, 2024
2 parents daeb4b0 + 31b754f commit beb4220
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .changeset/fast-pans-sleep.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@reservoir0x/relay-kit-ui': patch
---

Fix high price impact warning
3 changes: 1 addition & 2 deletions packages/ui/src/components/widgets/WidgetErrorWell.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,7 @@ export const WidgetErrorWell: FC<Props> = ({
const isHighPriceImpact = Number(quote?.details?.totalImpact?.percent) < -3.5
const totalImpactUsd = quote?.details?.totalImpact?.usd
const showHighPriceImpactWarning =
isHighPriceImpact && totalImpactUsd && Number(totalImpactUsd) <= 10

isHighPriceImpact && totalImpactUsd && Number(totalImpactUsd) <= -10
const isInsufficientLiquidityError =
fetchQuoteErrorMessage?.includes('No quotes found')

Expand Down

0 comments on commit beb4220

Please sign in to comment.