From 6c13427b05edc6604bf2f2f4f9fc75e952cc2b0e Mon Sep 17 00:00:00 2001 From: piersss Date: Mon, 10 Jun 2024 22:14:07 +0200 Subject: [PATCH] 915: Only override when mainnets includes chainId --- src/helpers/swapErc20.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/helpers/swapErc20.ts b/src/helpers/swapErc20.ts index a30ca9b5..9baa0128 100644 --- a/src/helpers/swapErc20.ts +++ b/src/helpers/swapErc20.ts @@ -1,4 +1,5 @@ import { SwapERC20 } from "@airswap/libraries"; +import { mainnets } from "@airswap/utils"; import { ethers } from "ethers"; @@ -573,7 +574,7 @@ export const getSwapErc20Contract = ( providerOrSigner: ethers.providers.Provider | ethers.Signer, chainId: number ): ethers.Contract => { - if (!shouldOverride || chainId !== 1) { + if (!shouldOverride || !mainnets.includes(chainId)) { return SwapERC20.getContract(providerOrSigner, chainId); }