Skip to content
This repository has been archived by the owner on Jun 24, 2022. It is now read-only.

Commit

Permalink
re-enable fiat impact
Browse files Browse the repository at this point in the history
  • Loading branch information
W3stside committed Dec 10, 2021
1 parent 50a32a1 commit ba4abb3
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions src/custom/hooks/usePriceImpact/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,14 @@ export interface PriceImpact {
}

export default function usePriceImpact({ abTrade, parsedAmounts, isWrapping }: PriceImpactParams): PriceImpact {
/* const fiatPriceImpact = */ useFiatValuePriceImpact(parsedAmounts)
// TODO: remove this - testing only - forces fallback price impact
const fiatPriceImpact = useFiatValuePriceImpact(parsedAmounts)
const {
impact: fallbackPriceImpact,
error,
loading,
} = useFallbackPriceImpact({ abTrade, fiatPriceImpact: undefined, isWrapping })
} = useFallbackPriceImpact({ abTrade: fiatPriceImpact ? undefined : abTrade, isWrapping })

const priceImpact = /* fiatPriceImpact || */ fallbackPriceImpact
const priceImpact = fiatPriceImpact || fallbackPriceImpact

// TODO: remove this - testing only - forces fallback
return { priceImpact, error, loading }
}

0 comments on commit ba4abb3

Please sign in to comment.