From 7c8f3f821437b7558b3c7779d64ef3a9cdb78975 Mon Sep 17 00:00:00 2001 From: jsy1218 <91580504+jsy1218@users.noreply.github.com> Date: Tue, 27 Aug 2024 16:45:45 -0700 Subject: [PATCH] fix compiling error --- lib/handlers/injector-sor.ts | 2 ++ .../traffic-switch-on-chain-quote-provider.ts | 17 ++++++++++++----- 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/lib/handlers/injector-sor.ts b/lib/handlers/injector-sor.ts index 1695153023..b651cadaaf 100644 --- a/lib/handlers/injector-sor.ts +++ b/lib/handlers/injector-sor.ts @@ -400,6 +400,7 @@ export abstract class InjectorSOR extends Injector< process.env.TENDERLY_NODE_API_KEY!, v2PoolProvider, v3PoolProvider, + v4PoolProvider, provider, portionProvider, undefined, @@ -414,6 +415,7 @@ export abstract class InjectorSOR extends Injector< provider, v2PoolProvider, v3PoolProvider, + v4PoolProvider, portionProvider ) diff --git a/lib/handlers/quote/provider-migration/v3/traffic-switch-on-chain-quote-provider.ts b/lib/handlers/quote/provider-migration/v3/traffic-switch-on-chain-quote-provider.ts index c3a8e2ca26..9767664ae3 100644 --- a/lib/handlers/quote/provider-migration/v3/traffic-switch-on-chain-quote-provider.ts +++ b/lib/handlers/quote/provider-migration/v3/traffic-switch-on-chain-quote-provider.ts @@ -1,5 +1,12 @@ -import { IOnChainQuoteProvider, log, metric, MetricLoggerUnit, OnChainQuotes } from '@uniswap/smart-order-router' -import { MixedRoute, V2Route, V3Route } from '@uniswap/smart-order-router/build/main/routers' +import { + IOnChainQuoteProvider, + log, + metric, + MetricLoggerUnit, + OnChainQuotes, + SupportedExactOutRoutes, + SupportedRoutes +} from '@uniswap/smart-order-router' import { ChainId, Currency, CurrencyAmount } from '@uniswap/sdk-core' import { ProviderConfig } from '@uniswap/smart-order-router/build/main/providers/provider' import { QUOTE_PROVIDER_TRAFFIC_SWITCH_CONFIGURATION } from '../../util/quote-provider-traffic-switch-configuration' @@ -35,7 +42,7 @@ export class TrafficSwitchOnChainQuoteProvider implements IOnChainQuoteProvider this.chainId = props.chainId } - async getQuotesManyExactIn( + async getQuotesManyExactIn( amountIns: CurrencyAmount[], routes: TRoute[], providerConfig?: ProviderConfig @@ -117,7 +124,7 @@ export class TrafficSwitchOnChainQuoteProvider implements IOnChainQuoteProvider } } - async getQuotesManyExactOut( + async getQuotesManyExactOut( amountOuts: CurrencyAmount[], routes: TRoute[], providerConfig?: ProviderConfig @@ -211,7 +218,7 @@ export class TrafficSwitchOnChainQuoteProvider implements IOnChainQuoteProvider } } - private compareQuotes( + private compareQuotes( tradeTypeMetric: string, currentRoutesWithQuotes: OnChainQuotes, targetRoutesWithQuotes: OnChainQuotes