diff --git a/tasks.py b/tasks.py index a32e24a..fd97cea 100644 --- a/tasks.py +++ b/tasks.py @@ -58,9 +58,9 @@ async def on_invoice_paid(payment: Payment) -> None: ) logger.debug(f"tpos: tip invoice created: {payment.payment_hash}") - checking_id = await pay_invoice( + payment = await pay_invoice( payment_request=payment.bolt11, wallet_id=payment.wallet_id, extra={**payment.extra, "tipSplitted": True}, ) - logger.debug(f"tpos: tip invoice paid: {checking_id}") + logger.debug(f"tpos: tip invoice paid: {payment.checking_id}") diff --git a/templates/tpos/index.html b/templates/tpos/index.html index dce743a..99491f9 100644 --- a/templates/tpos/index.html +++ b/templates/tpos/index.html @@ -560,9 +560,7 @@
${ urlDialog.data.name }
${
diff --git a/views_api.py b/views_api.py
index b527b47..ab7412e 100644
--- a/views_api.py
+++ b/views_api.py
@@ -119,7 +119,7 @@ async def api_tpos_create_invoice(
amount += tip_amount
try:
- payment_hash, payment_request = await create_invoice(
+ payment = await create_invoice(
wallet_id=tpos.wallet,
amount=amount,
memo=f"{memo} to {tpos.name}" if memo else f"{tpos.name}",
@@ -136,7 +136,7 @@ async def api_tpos_create_invoice(
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}
@tpos_api_router.get("/api/v1/tposs/{tpos_id}/invoices")