Skip to content

Commit

Permalink
fix(limit-orders): remove high price impact warning flickering (#3419)
Browse files Browse the repository at this point in the history
  • Loading branch information
shoom3301 authored Dec 6, 2023
1 parent 0a46402 commit 8b14e71
Showing 1 changed file with 2 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -75,19 +75,10 @@ export function LimitOrdersWarnings(props: LimitOrdersWarningsProps) {

const canTrade = localFormValidation === null && primaryFormValidation === null && !tradeQuote.error
const showPriceImpactWarning =
canTrade &&
!tradeQuote.isLoading &&
!expertMode &&
!!account &&
!priceImpactParams.loading &&
!priceImpactParams.priceImpact
canTrade && !expertMode && !!account && !priceImpactParams.loading && !priceImpactParams.priceImpact

const showRateImpactWarning =
canTrade &&
!tradeQuote.isLoading &&
inputCurrency &&
!isFractionFalsy(inputCurrencyAmount) &&
!isFractionFalsy(outputCurrencyAmount)
canTrade && inputCurrency && !isFractionFalsy(inputCurrencyAmount) && !isFractionFalsy(outputCurrencyAmount)

const feePercentage = calculatePercentageInRelationToReference({ value: feeAmount, reference: inputCurrencyAmount })

Expand Down

0 comments on commit 8b14e71

Please sign in to comment.