@@ -220,13 +220,13 @@ function DenyConfirmDrawer({ children, onSubmit, ...drawerProps }: DenyConfirmDr
220220function QuoteActions ( {
221221 value,
222222 isFetching,
223- newKeyset ,
223+ mintingEnabled ,
224224 ebillPaid,
225225 requestedToPay,
226226} : {
227227 value : InfoReply
228228 isFetching : boolean
229- newKeyset : boolean
229+ mintingEnabled : boolean
230230 ebillPaid : boolean
231231 requestedToPay : boolean
232232} ) {
@@ -471,7 +471,7 @@ function QuoteActions({
471471 trigger = {
472472 < Button
473473 className = "flex-1"
474- disabled = { isFetching || enableMintingMutation . isPending || ! newKeyset }
474+ disabled = { isFetching || enableMintingMutation . isPending || mintingEnabled }
475475 variant = "default"
476476 >
477477 Enable Minting { enableMintingMutation . isPending && < LoaderIcon className = "stroke-1 animate-spin" /> }
@@ -482,7 +482,7 @@ function QuoteActions({
482482 < > </ >
483483 ) }
484484
485- { value . status === "Accepted" && "keyset_id" in value && ! ebillPaid && ! newKeyset && ! requestedToPay ? (
485+ { value . status === "Accepted" && "keyset_id" in value && ! ebillPaid && ! requestedToPay ? (
486486 < ConfirmDrawer
487487 title = "Confirm requesting to pay"
488488 description = "Are you sure you want to request to pay this e-bill?"
@@ -706,7 +706,7 @@ function Quote({ value, isFetching }: { value: InfoReply; isFetching: boolean })
706706 const paymentAddress = paymentData ?. data ?. payment_details ?. address_to_pay ?? ""
707707
708708 const ebillPaid = keysetData ?. data && "active" in keysetData . data && keysetData . data . active === false
709- const newKeyset = "keyset_id" in value && ( ! keysetData ?. data || ! ( "active" in keysetData . data ) )
709+ const mintingEnabled = value . status === "Accepted" && value . minting_status . status === "Enabled"
710710
711711 return (
712712 < div className = "flex flex-col gap-1" >
@@ -736,10 +736,10 @@ function Quote({ value, isFetching }: { value: InfoReply; isFetching: boolean })
736736 { ebillPaid ? "Paid" : "Unpaid" }
737737 </ Badge >
738738 < Badge
739- variant = { newKeyset ? "default" : "destructive" }
740- className = { newKeyset ? "bg-red-500" : "bg-blue-500" }
739+ variant = { mintingEnabled ? "default" : "destructive" }
740+ className = { mintingEnabled ? "bg-red-500" : "bg-blue-500" }
741741 >
742- { newKeyset ? "Disabled" : "Enabled" }
742+ { mintingEnabled ? "Disabled" : "Enabled" }
743743 </ Badge >
744744 </ TableCell >
745745 </ TableRow >
@@ -828,7 +828,7 @@ function Quote({ value, isFetching }: { value: InfoReply; isFetching: boolean })
828828 < QuoteActions
829829 value = { value }
830830 isFetching = { isFetching }
831- newKeyset = { newKeyset }
831+ mintingEnabled = { mintingEnabled }
832832 ebillPaid = { ebillPaid ?? false }
833833 requestedToPay = { requestedToPay ?? false }
834834 />
0 commit comments