Skip to content

Commit

Permalink
fix: price impact
Browse files Browse the repository at this point in the history
  • Loading branch information
ChefJerry authored and chefjackson committed Sep 5, 2024
1 parent 977aa4e commit 00cdca3
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -144,9 +144,10 @@ const SwapCommitButtonInner = memo(function SwapCommitButtonInner({
)

const tradePriceBreakdown = useMemo(
() => computeTradePriceBreakdown(isXOrder(order) ? order.ammTrade : order?.trade),
() => computeTradePriceBreakdown(isXOrder(order) ? undefined : order?.trade),
[order],
)

// warnings on slippage
const priceImpactSeverity = warningSeverity(
tradePriceBreakdown ? tradePriceBreakdown.priceImpactWithoutFee : undefined,
Expand Down

0 comments on commit 00cdca3

Please sign in to comment.