From 0c5b57749951aab5460112b32792927c50b8097a Mon Sep 17 00:00:00 2001 From: Padreug Date: Sat, 5 Sep 2026 19:51:04 +0200 Subject: [PATCH] fix(events): read buyer id from auth service in fiat checkout MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The fiat path pulled `currentUser` off the LNbits API client, which never exposed it — only `getAccessToken()`. `userId` was therefore always undefined and every Stripe/fiat "Continue" click failed with "Missing user id" before the request was ever sent. Use `useAuth()`'s `currentUser`, the same source the Lightning path already goes through. Co-Authored-By: Claude Opus 5 Claude-Session: https://claude.ai/code/session_01YLt6zWfXA1hM8zYQdpbeyn --- src/modules/events/components/PurchaseTicketDialog.vue | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/modules/events/components/PurchaseTicketDialog.vue b/src/modules/events/components/PurchaseTicketDialog.vue index 0d13601..a9543f1 100644 --- a/src/modules/events/components/PurchaseTicketDialog.vue +++ b/src/modules/events/components/PurchaseTicketDialog.vue @@ -36,7 +36,7 @@ interface Emits { const props = defineProps() const emit = defineEmits() -const { isAuthenticated, userDisplay } = useAuth() +const { isAuthenticated, userDisplay, currentUser } = useAuth() const { isLoading, error, @@ -201,8 +201,7 @@ async function handlePurchase() { const lnbitsAPI = injectService(SERVICE_TOKENS.LNBITS_API) as any const accessToken = lnbitsAPI?.getAccessToken?.() || '' const ticketApi = injectService(SERVICE_TOKENS.TICKET_API) as TicketApiService - const currentUser = (lnbitsAPI?.currentUser?.value) || null - const userId = currentUser?.id + const userId = currentUser.value?.id if (!userId) { fiatError.value = 'Missing user id' return