From 26cfd1b30ebdedda0f3671e2cdeda7b2bd2e3696 Mon Sep 17 00:00:00 2001 From: MananTank Date: Tue, 25 Mar 2025 01:57:05 +0000 Subject: [PATCH] [TOOL-3682] Dashboard: Change deploy contract status for in-app wallet (#6533) --- .../deploy-context-modal.tsx | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/apps/dashboard/src/components/contract-components/contract-deploy-form/deploy-context-modal.tsx b/apps/dashboard/src/components/contract-components/contract-deploy-form/deploy-context-modal.tsx index 22f328d238d..cdbf82465e0 100644 --- a/apps/dashboard/src/components/contract-components/contract-deploy-form/deploy-context-modal.tsx +++ b/apps/dashboard/src/components/contract-components/contract-deploy-form/deploy-context-modal.tsx @@ -10,6 +10,7 @@ import { cn } from "@/lib/utils"; import { CircleCheck, CircleIcon } from "lucide-react"; import Link from "next/link"; import { useCallback, useState } from "react"; +import { useActiveWallet } from "thirdweb/react"; export type DeployModalStep = { type: "deploy" | "setNFTMetadata"; @@ -79,9 +80,9 @@ export function DeployStatusModal(props: { dialogCloseClassName="hidden" className="gap-0 p-0 md:max-w-[480px]" > -
+
- + Deploy Status @@ -125,7 +126,10 @@ type DeployModalStepProps = { function RenderDeployModalStep(props: DeployModalStepProps) { const { isActive, hasCompleted } = props; - const { title, description } = getStepInfo(props.step); + const wallet = useActiveWallet(); + const requiresSignature = wallet?.id !== "inApp"; + + const { title, description } = getStepInfo(props.step, requiresSignature); return (
0 + step.signatureCount > 0 && requiresSignature ? `Your wallet will prompt you to sign ${ step.signatureCount === 1 ? "the" : step.signatureCount || 1 } transaction${step.signatureCount > 1 ? "s" : ""}.` @@ -177,7 +184,7 @@ function getStepInfo(step: DeployModalStep): TitleAndDesc { title: "Setting NFT metadata", description: ( <> - {step.signatureCount > 0 + {step.signatureCount > 0 && requiresSignature ? "Your wallet will prompt you to sign the transaction. " : "This may take a few seconds."}