File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed
apps/dashboard/src/app/(app)/(dashboard)/contracts/publish/[publish_uri] Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -2,9 +2,9 @@ import { ChakraProviderSetup } from "chakra/ChakraProviderSetup";
22import { revalidatePath } from "next/cache" ;
33import { notFound , redirect } from "next/navigation" ;
44import { fetchDeployMetadata } from "thirdweb/contract" ;
5+ import { getUserThirdwebClient } from "@/api/auth-token" ;
56import { ContractPublishForm } from "@/components/contract-components/contract-publish-form" ;
67import { getActiveAccountCookie , getJWTCookie } from "@/constants/cookie" ;
7- import { getClientThirdwebClient } from "@/constants/thirdweb-client.client" ;
88import { serverThirdwebClient } from "@/constants/thirdweb-client.server" ;
99import { getLatestPublishedContractsWithPublisherMapping } from "../../../published-contract/[publisher]/[contract_id]/utils/getPublishedContractsWithPublisherMapping" ;
1010
@@ -68,14 +68,15 @@ export default async function PublishContractPage(
6868 redirect ( `/login?next=${ encodeURIComponent ( pathname ) } ` ) ;
6969 }
7070
71+ const userThirdwebClient = await getUserThirdwebClient ( {
72+ teamId : undefined ,
73+ } ) ;
74+
7175 return (
7276 < div className = "container flex max-w-[1130px] flex-col gap-8 py-8" >
7377 < ChakraProviderSetup >
7478 < ContractPublishForm
75- client = { getClientThirdwebClient ( {
76- jwt : token ,
77- teamId : undefined ,
78- } ) }
79+ client = { userThirdwebClient }
7980 isLoggedIn = { ! ! token }
8081 onPublishSuccess = { async ( ) => {
8182 "use server" ;
You can’t perform that action at this time.
0 commit comments