feat(events): handle free tickets in the purchase flow #131
No reviewers
Labels
No labels
app:activities
app:chat
app:events
app:forum
app:libra
app:market
app:restaurant
app:tasks
app:wallet
app:webapp
bug
enhancement
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
aiolabs/webapp!131
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "feat/free-tickets-client"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Client companion to aiolabs/events#31 (backend free-ticket issuance).
Problem
Free events (
price 0/ 100%-off promo) were unbuyable. The backend returned an invoice-less response, and the composable's guardif (invoice.isFiat || !invoice.paymentRequest)treated any missingpaymentRequestas fiat and threw "This event uses fiat checkout".Change
With #31, a free purchase returns
paid: true+ticketIdsinline and nopayment_request— tickets are already issued and marked paid, nothing to settle.TicketPurchaseInvoicegainspaid+ticketIds;TicketApiServicemaps them from the response.purchaseTicketForEventshort-circuits oninvoice.paid: skip the QR / payment-poll and jump straight to the ticket-QR success state with the inline ids. The fiat-checkout error now only fires for an actual fiat (not-paid) response.finalizePurchasedTickets()used by both the Lightning-poll path and the free path, so they render identically.PurchaseTicketDialog: for free events, drop the payment-method selector + price line, show "Free", and label the CTA "Get ticket".Notes / testing
showTicketQR+ticketQRCodes+purchasedTicketIds), so it lands on the same screen the paid flow does — it just skips the invoice screen.vue-tscclean; existing vitest suite green (19). The purchase composable is DI-heavy (no isolated unit harness, matching the existing untested flow); verify end-to-end against a dev LNbits with events#31 deployed: buy a free ticket → no invoice screen, ticket QR shows immediately, appears in My Tickets, scannable at the door.🤖 Generated with Claude Code