diff --git a/apps/dashboard/src/app/(dashboard)/contracts/deploy/[compiler_uri]/page.tsx b/apps/dashboard/src/app/(dashboard)/contracts/deploy/[compiler_uri]/page.tsx index e883caa3435..14e56aef9c0 100644 --- a/apps/dashboard/src/app/(dashboard)/contracts/deploy/[compiler_uri]/page.tsx +++ b/apps/dashboard/src/app/(dashboard)/contracts/deploy/[compiler_uri]/page.tsx @@ -1,4 +1,5 @@ import { getThirdwebClient } from "@/constants/thirdweb.server"; +import { notFound } from "next/navigation"; import { fetchDeployMetadata } from "thirdweb/contract"; import { DeployContractInfo } from "../../../published-contract/components/contract-info"; import { DeployFormForUri } from "../../../published-contract/components/uri-based-deploy"; @@ -16,7 +17,12 @@ export default async function DirectDeployPage(props: DirectDeployPageProps) { client: getThirdwebClient(), // force `ipfs://` prefix uri: parsedUri.startsWith("ipfs://") ? parsedUri : `ipfs://${parsedUri}`, - }); + }).catch(() => null); + + if (!metadata) { + notFound(); + } + return (
null); + + if (!publishMetadataFromUri) { + notFound(); + } let publishMetadata = publishMetadataFromUri;