Skip to content

Commit

Permalink
Fix BaseContract not selecting specific chain deployments
Browse files Browse the repository at this point in the history
  • Loading branch information
yagopv committed Apr 29, 2024
1 parent f03d793 commit 26e5fff
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion packages/protocol-kit/src/contracts/BaseContract.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,10 @@ class BaseContract<ContractAbiType extends InterfaceAbi & Abi> {
) {
const deployment = getContractDeployment(safeVersion, chainId, contractName)

const contractAddress = customContractAddress || deployment?.defaultAddress
const contractAddress =
customContractAddress ||
deployment?.networkAddresses[chainId.toString()] ||
deployment?.defaultAddress

if (!contractAddress) {
throw new Error(`Invalid ${contractName.replace('Version', '')} contract address`)
Expand Down

0 comments on commit 26e5fff

Please sign in to comment.