@@ -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,28 +287,29 @@ function QuoteActions({
287287 } ,
288288 } )
289289
290- const activateKeysetMutation = useMutation ( {
290+ const enableMintingMutation = useMutation ( {
291291 mutationFn : async ( ) => {
292- const { data } = await activateKeyset ( {
293- body : {
294- qid : value . id ,
292+ const { data } = await enableMinting ( {
293+ path : {
294+ id : value . id ,
295295 } ,
296+ body : { } ,
296297 throwOnError : true ,
297298 } )
298299 return data
299300 } ,
300301 onMutate : ( ) => {
301- toast . loading ( "Activating keyset …" , { id : `quote-${ value . id } -activate-keyset ` } )
302+ toast . loading ( "Enabling minting …" , { id : `quote-${ value . id } -enable-minting ` } )
302303 } ,
303304 onSettled : ( ) => {
304- toast . dismiss ( `quote-${ value . id } -activate-keyset ` )
305+ toast . dismiss ( `quote-${ value . id } -enable-minting ` )
305306 } ,
306307 onError : ( error ) => {
307- toast . error ( "Error while activating keyset : " + error . message )
308+ toast . error ( "Error while enabling minting : " + error . message )
308309 console . warn ( error )
309310 } ,
310311 onSuccess : ( ) => {
311- toast . success ( "Keyset has been activated ." )
312+ toast . success ( "Minting has been enabled ." )
312313 void queryClient . invalidateQueries ( )
313314 } ,
314315 } )
@@ -372,8 +373,8 @@ function QuoteActions({
372373 } )
373374 }
374375
375- const onActivateKeyset = ( ) => {
376- activateKeysetMutation . mutate ( )
376+ const onEnableMinting = ( ) => {
377+ enableMintingMutation . mutate ( )
377378 }
378379
379380 const onRequestToPay = ( ) => {
@@ -458,22 +459,22 @@ function QuoteActions({
458459
459460 { value . status === "Accepted" && "keyset_id" in value ? (
460461 < 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 }
462+ title = "Confirm enabling minting "
463+ description = "Are you sure you want to enable minting for this quote?"
464+ open = { enableMintingConfirmDrawerOpen }
465+ onOpenChange = { setEnableMintingConfirmDrawerOpen }
465466 onSubmit = { ( ) => {
466- onActivateKeyset ( )
467- setActivateKeysetConfirmDrawerOpen ( false )
467+ onEnableMinting ( )
468+ setEnableMintingConfirmDrawerOpen ( false )
468469 } }
469- submitButtonText = "Yes, activate keyset "
470+ submitButtonText = "Yes, enable minting "
470471 trigger = {
471472 < Button
472473 className = "flex-1"
473- disabled = { isFetching || activateKeysetMutation . isPending || ! newKeyset }
474+ disabled = { isFetching || enableMintingMutation . isPending || ! newKeyset }
474475 variant = "default"
475476 >
476- Activate Keyset { activateKeysetMutation . isPending && < LoaderIcon className = "stroke-1 animate-spin" /> }
477+ Enable Minting { enableMintingMutation . isPending && < LoaderIcon className = "stroke-1 animate-spin" /> }
477478 </ Button >
478479 }
479480 />
0 commit comments