File tree Expand file tree Collapse file tree 2 files changed +12
-2
lines changed
apps/dashboard/src/app/(dashboard)/contracts Expand file tree Collapse file tree 2 files changed +12
-2
lines changed Original file line number Diff line number Diff line change 11import { getThirdwebClient } from "@/constants/thirdweb.server" ;
2+ import { notFound } from "next/navigation" ;
23import { fetchDeployMetadata } from "thirdweb/contract" ;
34import { DeployContractInfo } from "../../../published-contract/components/contract-info" ;
45import { DeployFormForUri } from "../../../published-contract/components/uri-based-deploy" ;
@@ -16,7 +17,12 @@ export default async function DirectDeployPage(props: DirectDeployPageProps) {
1617 client : getThirdwebClient ( ) ,
1718 // force `ipfs://` prefix
1819 uri : parsedUri . startsWith ( "ipfs://" ) ? parsedUri : `ipfs://${ parsedUri } ` ,
19- } ) ;
20+ } ) . catch ( ( ) => null ) ;
21+
22+ if ( ! metadata ) {
23+ return notFound ( ) ;
24+ }
25+
2026 return (
2127 < div className = "container flex flex-col gap-4 py-8" >
2228 < DeployContractInfo
Original file line number Diff line number Diff line change @@ -25,7 +25,11 @@ export default async function PublishContractPage(
2525 const publishMetadataFromUri = await fetchDeployMetadata ( {
2626 uri : publishUri ,
2727 client : getThirdwebClient ( ) ,
28- } ) ;
28+ } ) . catch ( ( ) => null ) ;
29+
30+ if ( ! publishMetadataFromUri ) {
31+ notFound ( ) ;
32+ }
2933
3034 let publishMetadata = publishMetadataFromUri ;
3135
You can’t perform that action at this time.
0 commit comments