Skip to content

Commit

Permalink
do not throw
Browse files Browse the repository at this point in the history
  • Loading branch information
ezynda3 committed Sep 10, 2024
1 parent 465b1bd commit e4d4f57
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
3 changes: 1 addition & 2 deletions src/lib/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ export const getContractInformation = async (
}
} catch (e) {
consola.error('Address: ', address, 'ChainId: ', chainId, 'Error: ', e)
throw new Error('Contract not found')
return { name: 'Unverified', address, abi: [] }
}
}

Expand Down Expand Up @@ -108,7 +108,6 @@ export const getCachedContractInformation = async (
// Don't cache unverified contracts
if (contract.name === 'Unverified') {
consola.info('Contract is unverified.')
console.log(contract)
return contract
}

Expand Down
3 changes: 2 additions & 1 deletion src/routes/diamond/[address]/json/+server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,13 @@ export const GET: RequestHandler = async ({ params, url, locals }) => {
facets: [],
}

console.log(diamond)

// Fetch all facet information
for (const [address, selectors] of facetData) {
try {
const facet = await buildFacet(address, selectors, chain.id, locals.db)
if (!facet) continue
if (facet.name === 'Unverified') continue
diamond.facets.push(facet)
diamondAbi = [...diamondAbi, ...facet.abi]
} catch (e) {
Expand Down

0 comments on commit e4d4f57

Please # to comment.