From bd77ffe5aebaff0ba805d17c9a47f3bc86b4f45d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Yago=20P=C3=A9rez=20V=C3=A1zquez?= Date: Tue, 24 Sep 2024 14:36:20 +0200 Subject: [PATCH] Fix issue --- packages/protocol-kit/src/contracts/config.ts | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/packages/protocol-kit/src/contracts/config.ts b/packages/protocol-kit/src/contracts/config.ts index 5cee59309..c2b66e5f9 100644 --- a/packages/protocol-kit/src/contracts/config.ts +++ b/packages/protocol-kit/src/contracts/config.ts @@ -166,8 +166,14 @@ export function getContractInfo(contractAddress: string): ContractInfo | undefin ) as SingletonDeployment if (deployment && deployment.networkAddresses) { - for (const [, address] of Object.entries(deployment.networkAddresses)) { - if (address.toLowerCase() === contractAddress.toLowerCase()) { + for (const [, addresses] of Object.entries(deployment.networkAddresses)) { + console.log(addresses, contractAddress) + if ( + (Array.isArray(addresses) && + addresses.find((a) => a.toLowerCase() === contractAddress.toLowerCase())) || + (typeof addresses === 'string' && + addresses.toLowerCase() === contractAddress.toLowerCase()) + ) { const types = Object.keys(deployment.deployments) as DeploymentType[] const type = types.find(