Skip to content

Commit

Permalink
[TOOL-2924] Catch error on fail-to-load metadata (#5892)
Browse files Browse the repository at this point in the history
TOOL-2924
  • Loading branch information
kien-ngo committed Jan 6, 2025
1 parent 6bbfc4d commit 9bc7884
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ export const NFTRevealButton: React.FC<NFTRevealButtonProps> = ({
);
}

return batchesQuery.data?.length ? (
return (
<MinterOnly contract={contract}>
<Sheet open={open} onOpenChange={setOpen}>
<SheetTrigger asChild>
Expand Down Expand Up @@ -168,5 +168,5 @@ export const NFTRevealButton: React.FC<NFTRevealButtonProps> = ({
</SheetContent>
</Sheet>
</MinterOnly>
) : null;
);
};
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import * as TokenURI from "../../__generated__/IERC721A/read/tokenURI.js";
export interface BatchToReveal {
batchId: bigint;
batchUri: string;
placeholderMetadata: NFTMetadata;
placeholderMetadata: NFTMetadata | undefined;
}

/**
Expand Down Expand Up @@ -82,7 +82,7 @@ export async function getBatchesToReveal(
tokenId: BigInt(i),
tokenUri: uri,
client: options.contract.client,
});
}).catch(() => undefined);
}),
);

Expand Down

0 comments on commit 9bc7884

Please sign in to comment.