fix: 1.0.0-rc5
Some checks are pending
lint / lint (push) Waiting to run

This commit is contained in:
dni ⚡ 2024-10-22 10:49:52 +02:00
parent 6714dcddc7
commit c729ef17a6
No known key found for this signature in database
GPG key ID: D1F416F29AD26E87
2 changed files with 128 additions and 123 deletions

View file

@ -140,14 +140,14 @@ async def api_ticket_make_ticket(event_id, name, email):
extra["rate"] = await get_fiat_rate_satoshis(event.currency)
try:
payment_hash, payment_request = await create_invoice(
payment = await create_invoice(
wallet_id=event.wallet,
amount=price, # type: ignore
amount=price,
memo=f"{event_id}",
extra=extra,
)
await create_ticket(
payment_hash=payment_hash,
payment_hash=payment.payment_hash,
wallet=event.wallet,
event=event.id,
name=name,
@ -157,7 +157,7 @@ async def api_ticket_make_ticket(event_id, name, email):
raise HTTPException(
status_code=HTTPStatus.INTERNAL_SERVER_ERROR, detail=str(exc)
) from exc
return {"payment_hash": payment_hash, "payment_request": payment_request}
return {"payment_hash": payment.payment_hash, "payment_request": payment.bolt11}
@events_api_router.post("/api/v1/tickets/{event_id}/{payment_hash}")