Skip to content

Commit

Permalink
Fix issue
Browse files Browse the repository at this point in the history
  • Loading branch information
yagopv committed Sep 24, 2024
1 parent b2f5f36 commit bd77ffe
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions packages/protocol-kit/src/contracts/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down

0 comments on commit bd77ffe

Please sign in to comment.