From 2ca4cf083de0b4b87e608ce97121d15a2fdae227 Mon Sep 17 00:00:00 2001 From: jsy1218 <91580504+jsy1218@users.noreply.github.com> Date: Tue, 27 Feb 2024 09:06:44 -0800 Subject: [PATCH] add sepolia to v2 supported array (#507) * add sepolia to v2 supported array * catch v2 gas model exception to return undefined v2 gas model --- src/routers/alpha-router/alpha-router.ts | 2 +- src/util/chains.ts | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/routers/alpha-router/alpha-router.ts b/src/routers/alpha-router/alpha-router.ts index 93122c4fa..9a04f0fc6 100644 --- a/src/routers/alpha-router/alpha-router.ts +++ b/src/routers/alpha-router/alpha-router.ts @@ -2089,7 +2089,7 @@ export class AlphaRouter token: quoteToken, l2GasDataProvider: this.l2GasDataProvider, providerConfig: providerConfig, - }) + }).catch(_ => undefined) // If v2 model throws uncaught exception, we return undefined v2 gas model, so there's a chance v3 route can go through : Promise.resolve(undefined); const v3GasModelPromise = this.v3GasModelFactory.buildGasModel({ diff --git a/src/util/chains.ts b/src/util/chains.ts index 917abe4f7..6da04cf02 100644 --- a/src/util/chains.ts +++ b/src/util/chains.ts @@ -29,6 +29,7 @@ export const SUPPORTED_CHAINS: ChainId[] = [ export const V2_SUPPORTED = [ ChainId.MAINNET, + ChainId.SEPOLIA, ChainId.ARBITRUM_ONE, ChainId.OPTIMISM, ChainId.POLYGON,