Commit dbb2f7f6 authored by eddie's avatar eddie Committed by GitHub

fix: re-enable UniswapX after disabling (#7080)

fix: allow gouda after user disables
parent 264f1457
......@@ -60,7 +60,7 @@ const DEFAULT_QUERY_PARAMS = {
}
function getRoutingAPIConfig(args: GetQuoteArgs): RoutingConfig {
const { account, tradeType, tokenOutAddress, tokenInChainId, uniswapXForceSyntheticQuotes } = args
const { account, tradeType, tokenOutAddress, tokenInChainId, uniswapXForceSyntheticQuotes, routerPreference } = args
const uniswapx = {
useSyntheticQuotes: uniswapXForceSyntheticQuotes,
......@@ -82,7 +82,7 @@ function getRoutingAPIConfig(args: GetQuoteArgs): RoutingConfig {
// so even if the user has selected UniswapX as their router preference, force them to receive a Classic quote.
if (
!args.uniswapXEnabled ||
args.userDisabledUniswapX ||
(args.userDisabledUniswapX && routerPreference !== RouterPreference.X) ||
tokenOutIsNative ||
tradeType === TradeType.EXACT_OUTPUT ||
!isUniswapXSupportedChain(tokenInChainId)
......
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