From 3db080ca119f775d840c1a190145fb01e56231f8 Mon Sep 17 00:00:00 2001 From: Michael Feng Date: Fri, 26 Jul 2024 11:48:27 -0700 Subject: [PATCH] (hack) add list of excluded router chains --- src/connectors/uniswap/uniswap.ts | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/connectors/uniswap/uniswap.ts b/src/connectors/uniswap/uniswap.ts index 1ce14ade6d..23c17f56ac 100644 --- a/src/connectors/uniswap/uniswap.ts +++ b/src/connectors/uniswap/uniswap.ts @@ -81,7 +81,14 @@ export class Uniswap implements Uniswapish { this._maximumHops = UniswapConfig.config.maximumHops; this._alphaRouter = null; - if (this.chainId !== 11155111 && this.chainId !== 8453) { + const excluded_chainIds = [ + 11155111, // sepolia + 8453, // base + 56, // binance-smart-chain + 42220, // celo + 43114, // avalanche + ]; + if (this.chainId in excluded_chainIds) { this._alphaRouter = new AlphaRouter({ chainId: this.chainId, provider: this.chain.provider,