@@ -18,7 +18,7 @@ import {
1818 adminLookupQuoteQueryKey ,
1919 adminUpdateQuoteMutation ,
2020} from "@/generated/client/@tanstack/react-query.gen"
21- import { activateKeyset , keysetInfo , paymentStatus , requestToMint } from "@/generated/client/sdk.gen"
21+ import { enableMinting , keysetInfo , paymentStatus , requestToMint } from "@/generated/client/sdk.gen"
2222import { cn , getInitials } from "@/lib/utils"
2323import { formatDate , humanReadableDuration } from "@/utils/dates"
2424
@@ -234,7 +234,7 @@ function QuoteActions({
234234 const [ offerFormDrawerOpen , setOfferFormDrawerOpen ] = useState ( false )
235235 const [ offerConfirmDrawerOpen , setOfferConfirmDrawerOpen ] = useState ( false )
236236 const [ denyConfirmDrawerOpen , setDenyConfirmDrawerOpen ] = useState ( false )
237- const [ activateKeysetConfirmDrawerOpen , setActivateKeysetConfirmDrawerOpen ] = useState ( false )
237+ const [ enableMintingConfirmDrawerOpen , setEnableMintingConfirmDrawerOpen ] = useState ( false )
238238 const [ requestToPayConfirmDrawerOpen , setRequestToPayConfirmDrawerOpen ] = useState ( false )
239239 const [ payRequestResponse , setPayRequestResponse ] = useState < RequestToMintResponseInfo | null > ( null )
240240
@@ -287,9 +287,9 @@ function QuoteActions({
287287 } ,
288288 } )
289289
290- const activateKeysetMutation = useMutation ( {
290+ const enableMintingMutation = useMutation ( {
291291 mutationFn : async ( ) => {
292- const { data } = await activateKeyset ( {
292+ const { data } = await enableMinting ( {
293293 body : {
294294 qid : value . id ,
295295 } ,
@@ -298,17 +298,17 @@ function QuoteActions({
298298 return data
299299 } ,
300300 onMutate : ( ) => {
301- toast . loading ( "Activating keyset…" , { id : `quote-${ value . id } -activate-keyset ` } )
301+ toast . loading ( "Activating keyset…" , { id : `quote-${ value . id } -enable-minting ` } )
302302 } ,
303303 onSettled : ( ) => {
304- toast . dismiss ( `quote-${ value . id } -activate-keyset ` )
304+ toast . dismiss ( `quote-${ value . id } -enable-minting ` )
305305 } ,
306306 onError : ( error ) => {
307- toast . error ( "Error while activating keyset : " + error . message )
307+ toast . error ( "Error while enabling minting : " + error . message )
308308 console . warn ( error )
309309 } ,
310310 onSuccess : ( ) => {
311- toast . success ( "Keyset has been activated ." )
311+ toast . success ( "Minting has been enabled ." )
312312 void queryClient . invalidateQueries ( )
313313 } ,
314314 } )
@@ -372,8 +372,8 @@ function QuoteActions({
372372 } )
373373 }
374374
375- const onActivateKeyset = ( ) => {
376- activateKeysetMutation . mutate ( )
375+ const onEnableMinting = ( ) => {
376+ enableMintingMutation . mutate ( )
377377 }
378378
379379 const onRequestToPay = ( ) => {
@@ -458,22 +458,22 @@ function QuoteActions({
458458
459459 { value . status === "Accepted" && "keyset_id" in value ? (
460460 < ConfirmDrawer
461- title = "Confirm activating keyset "
462- description = "Are you sure you want to activate the keyset for this quote?"
463- open = { activateKeysetConfirmDrawerOpen }
464- onOpenChange = { setActivateKeysetConfirmDrawerOpen }
461+ title = "Confirm enabling minting "
462+ description = "Are you sure you want to enable minting for this quote?"
463+ open = { enableMintingConfirmDrawerOpen }
464+ onOpenChange = { setEnableMintingConfirmDrawerOpen }
465465 onSubmit = { ( ) => {
466- onActivateKeyset ( )
467- setActivateKeysetConfirmDrawerOpen ( false )
466+ onEnableMinting ( )
467+ setEnableMintingConfirmDrawerOpen ( false )
468468 } }
469- submitButtonText = "Yes, activate keyset "
469+ submitButtonText = "Yes, enable minting "
470470 trigger = {
471471 < Button
472472 className = "flex-1"
473- disabled = { isFetching || activateKeysetMutation . isPending || ! newKeyset }
473+ disabled = { isFetching || enableMintingMutation . isPending || ! newKeyset }
474474 variant = "default"
475475 >
476- Activate Keyset { activateKeysetMutation . isPending && < LoaderIcon className = "stroke-1 animate-spin" /> }
476+ Enable Minting { enableMintingMutation . isPending && < LoaderIcon className = "stroke-1 animate-spin" /> }
477477 </ Button >
478478 }
479479 />
0 commit comments