Commit 1ffaf723 authored by Tina's avatar Tina Committed by GitHub

fix: dont show USD price difference for wraps (#7610)

dont show stableconi price difference on wraps
parent dd4b2dc7
......@@ -355,13 +355,13 @@ export function Swap({
const preTaxFiatValueTradeOutput = useUSDPrice(trade?.outputAmount)
const [stablecoinPriceImpact, preTaxStablecoinPriceImpact] = useMemo(
() =>
routeIsSyncing || !isClassicTrade(trade)
routeIsSyncing || !isClassicTrade(trade) || showWrap
? [undefined, undefined]
: [
computeFiatValuePriceImpact(fiatValueTradeInput.data, fiatValueTradeOutput.data),
computeFiatValuePriceImpact(fiatValueTradeInput.data, preTaxFiatValueTradeOutput.data),
],
[fiatValueTradeInput, fiatValueTradeOutput, preTaxFiatValueTradeOutput, routeIsSyncing, trade]
[fiatValueTradeInput, fiatValueTradeOutput, preTaxFiatValueTradeOutput, routeIsSyncing, trade, showWrap]
)
const { onSwitchTokens, onCurrencySelection, onUserInput, onChangeRecipient } = useSwapActionHandlers(dispatch)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment