Skip to content

Commit

Permalink
remove unverified facets
Browse files Browse the repository at this point in the history
  • Loading branch information
ezynda3 committed Sep 10, 2024
1 parent d60cd74 commit 465b1bd
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/routes/diamond/[address]/json/+server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ export const GET: RequestHandler = async ({ params, url, locals }) => {
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 Expand Up @@ -96,13 +97,10 @@ const buildFacet = async (
): Promise<Contract | undefined> => {
const facet: Contract = await getCachedContractInformation(address, chainId, db)

console.log(facet)

const abiSigs = []
if (!facet.abi.length) {
for (const s of selectors) {
const sig = await getFuncSigBySelector(s)
console.log(sig)
abiSigs.push(`function ${sig}`)
}
facet.abi = parseAbi(abiSigs)
Expand Down

0 comments on commit 465b1bd

Please # to comment.