Skip to content

Commit

Permalink
915: Only override when mainnets includes chainId
Browse files Browse the repository at this point in the history
  • Loading branch information
piersss committed Jun 10, 2024
1 parent a56d1ae commit 8485c8c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/helpers/swapErc20.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { SwapERC20 } from "@airswap/libraries";
import { mainnets } from "@airswap/utils";

import { ethers } from "ethers";

Expand Down Expand Up @@ -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);
}

Expand Down

0 comments on commit 8485c8c

Please sign in to comment.