From c04ae72ce676e6d539bb81112d376e4d1e02bb0a Mon Sep 17 00:00:00 2001 From: lift0xff Date: Tue, 21 May 2024 14:01:24 +0700 Subject: [PATCH] YODL: Fix imports that cause type error when compiled by webpack Fix from https://github.com/Uniswap/smart-order-router/issues/518#issuecomment-2057985100 --- src/providers/caching-token-provider.ts | 2 -- src/providers/token-provider.ts | 9 --------- .../alpha-router/functions/get-candidate-pools.ts | 10 ++++------ src/routers/alpha-router/gas-models/gas-model.ts | 2 -- 4 files changed, 4 insertions(+), 19 deletions(-) diff --git a/src/providers/caching-token-provider.ts b/src/providers/caching-token-provider.ts index e30483f88..7a46e5120 100644 --- a/src/providers/caching-token-provider.ts +++ b/src/providers/caching-token-provider.ts @@ -22,7 +22,6 @@ import { DAI_MOONBEAM, DAI_OPTIMISM, DAI_OPTIMISM_GOERLI, - DAI_OPTIMISM_SEPOLIA, DAI_POLYGON_MUMBAI, ETH_BNB, ITokenProvider, @@ -98,7 +97,6 @@ export const CACHE_SEED_TOKENS: { USDC: USDC_OPTIMISM_SEPOLIA, USDT: USDT_OPTIMISM_SEPOLIA, WBTC: WBTC_OPTIMISM_SEPOLIA, - DAI: DAI_OPTIMISM_SEPOLIA, }, [ChainId.ARBITRUM_ONE]: { USDC: USDC_ARBITRUM, diff --git a/src/providers/token-provider.ts b/src/providers/token-provider.ts index 09e7c9a85..c3098e8e6 100644 --- a/src/providers/token-provider.ts +++ b/src/providers/token-provider.ts @@ -239,13 +239,6 @@ export const WBTC_OPTIMISM_SEPOLIA = new Token( 'WBTC', 'Wrapped BTC' ); -export const DAI_OPTIMISM_SEPOLIA = new Token( - ChainId.OPTIMISM_SEPOLIA, - '0xDA10009cBd5D07dd0CeCc66161FC93D7c9000da1', - 18, - 'DAI', - 'Dai Stablecoin' -); export const USDC_ARBITRUM = new Token( ChainId.ARBITRUM_ONE, @@ -839,8 +832,6 @@ export const DAI_ON = (chainId: ChainId): Token => { return DAI_OPTIMISM; case ChainId.OPTIMISM_GOERLI: return DAI_OPTIMISM_GOERLI; - case ChainId.OPTIMISM_SEPOLIA: - return DAI_OPTIMISM_SEPOLIA; case ChainId.ARBITRUM_ONE: return DAI_ARBITRUM; case ChainId.ARBITRUM_GOERLI: diff --git a/src/routers/alpha-router/functions/get-candidate-pools.ts b/src/routers/alpha-router/functions/get-candidate-pools.ts index 41f80c4b6..d4d8751c5 100644 --- a/src/routers/alpha-router/functions/get-candidate-pools.ts +++ b/src/routers/alpha-router/functions/get-candidate-pools.ts @@ -4,16 +4,15 @@ import { FeeAmount } from '@uniswap/v3-sdk'; import _ from 'lodash'; import { - DAI_OPTIMISM_SEPOLIA, ITokenListProvider, IV2SubgraphProvider, - USDC_ARBITRUM_SEPOLIA, - USDC_OPTIMISM_SEPOLIA, - USDT_OPTIMISM_SEPOLIA, V2SubgraphPool, - WBTC_OPTIMISM_SEPOLIA } from '../../../providers'; import { + USDC_ARBITRUM_SEPOLIA, + USDC_OPTIMISM_SEPOLIA, + USDT_OPTIMISM_SEPOLIA, + WBTC_OPTIMISM_SEPOLIA, CELO, CELO_ALFAJORES, CEUR_CELO, @@ -155,7 +154,6 @@ const baseTokensByChain: { [chainId in ChainId]?: Token[] } = { WBTC_OPTIMISM_GOERLI, ], [ChainId.OPTIMISM_SEPOLIA]: [ - DAI_OPTIMISM_SEPOLIA, USDC_OPTIMISM_SEPOLIA, USDT_OPTIMISM_SEPOLIA, WBTC_OPTIMISM_SEPOLIA, diff --git a/src/routers/alpha-router/gas-models/gas-model.ts b/src/routers/alpha-router/gas-models/gas-model.ts index 628a8e05e..e162f52a2 100644 --- a/src/routers/alpha-router/gas-models/gas-model.ts +++ b/src/routers/alpha-router/gas-models/gas-model.ts @@ -18,7 +18,6 @@ import { DAI_MAINNET, DAI_OPTIMISM, DAI_OPTIMISM_GOERLI, - DAI_OPTIMISM_SEPOLIA, DAI_POLYGON_MUMBAI, DAI_SEPOLIA, USDB_BLAST, USDC_ARBITRUM, @@ -91,7 +90,6 @@ export const usdGasTokensByChain: { [chainId in ChainId]?: Token[] } = { USDT_OPTIMISM_GOERLI, ], [ChainId.OPTIMISM_SEPOLIA]: [ - DAI_OPTIMISM_SEPOLIA, USDC_OPTIMISM_SEPOLIA, USDT_OPTIMISM_SEPOLIA, ],