@@ -10,6 +10,7 @@ import { cn } from "@/lib/utils";
10
10
import { CircleCheck , CircleIcon } from "lucide-react" ;
11
11
import Link from "next/link" ;
12
12
import { useCallback , useState } from "react" ;
13
+ import { useActiveWallet } from "thirdweb/react" ;
13
14
14
15
export type DeployModalStep = {
15
16
type : "deploy" | "setNFTMetadata" ;
@@ -79,9 +80,9 @@ export function DeployStatusModal(props: {
79
80
dialogCloseClassName = "hidden"
80
81
className = "gap-0 p-0 md:max-w-[480px]"
81
82
>
82
- < div className = "flex flex-col gap-6 p-6" >
83
+ < div className = "flex flex-col gap-5 p-6" >
83
84
< DialogHeader >
84
- < DialogTitle className = "font-semibold text-2xl tracking-tight" >
85
+ < DialogTitle className = "font-semibold text-xl tracking-tight" >
85
86
Deploy Status
86
87
</ DialogTitle >
87
88
</ DialogHeader >
@@ -125,7 +126,10 @@ type DeployModalStepProps = {
125
126
126
127
function RenderDeployModalStep ( props : DeployModalStepProps ) {
127
128
const { isActive, hasCompleted } = props ;
128
- const { title, description } = getStepInfo ( props . step ) ;
129
+ const wallet = useActiveWallet ( ) ;
130
+ const requiresSignature = wallet ?. id !== "inApp" ;
131
+
132
+ const { title, description } = getStepInfo ( props . step , requiresSignature ) ;
129
133
return (
130
134
< div className = "rounded-lg border border-border bg-card" >
131
135
< div
@@ -158,13 +162,16 @@ type TitleAndDesc = {
158
162
description : React . ReactNode ;
159
163
} ;
160
164
161
- function getStepInfo ( step : DeployModalStep ) : TitleAndDesc {
165
+ function getStepInfo (
166
+ step : DeployModalStep ,
167
+ requiresSignature : boolean ,
168
+ ) : TitleAndDesc {
162
169
switch ( step . type ) {
163
170
case "deploy" : {
164
171
return {
165
172
title : "Deploying contract" ,
166
173
description :
167
- step . signatureCount > 0
174
+ step . signatureCount > 0 && requiresSignature
168
175
? `Your wallet will prompt you to sign ${
169
176
step . signatureCount === 1 ? "the" : step . signatureCount || 1
170
177
} transaction${ step . signatureCount > 1 ? "s" : "" } .`
@@ -177,7 +184,7 @@ function getStepInfo(step: DeployModalStep): TitleAndDesc {
177
184
title : "Setting NFT metadata" ,
178
185
description : (
179
186
< >
180
- { step . signatureCount > 0
187
+ { step . signatureCount > 0 && requiresSignature
181
188
? "Your wallet will prompt you to sign the transaction. "
182
189
: "This may take a few seconds." }
183
190
</ >
0 commit comments