Skip to content

Commit

Permalink
Don't cache unverified contracts
Browse files Browse the repository at this point in the history
  • Loading branch information
ezynda3 committed Mar 13, 2024
1 parent bee80f9 commit e90c0b2
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/lib/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,11 @@ export const getCachedContractInformation = async (
}
const contract = await getContractInformation(address, chainId)

// Don't cache unverified contracts
if (contract.name === 'Unverified') {
return contract
}

// Update the database
consola.info('Updating db cache')
await db.insert(contracts).values({
Expand Down

0 comments on commit e90c0b2

Please # to comment.