fix: Bug with flipping ura feature flag on/off in dev mode (#6686)

fix bug
This commit is contained in:
Tina 2023-06-02 12:12:06 -04:00 committed by GitHub
parent 72936322b3
commit a03231d356
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -71,9 +71,9 @@ export function useRoutingAPITrade<TTradeType extends TradeType>(
refetchOnMountOrArgChange: 2 * 60,
})
const tradeResult = v2TradeResult ?? legacyAPITradeResult
const currentTradeResult = currentLegacyAPITradeResult ?? currentV2TradeResult
const isError = isLegacyAPIError || isV2APIError
const [tradeResult, currentTradeResult, isError] = shouldUseRoutingApiV2
? [v2TradeResult, currentV2TradeResult, isV2APIError]
: [legacyAPITradeResult, currentLegacyAPITradeResult, isLegacyAPIError]
const isCurrent = currentTradeResult === tradeResult