Compare commits

...
Author SHA1 Message Date
dni ⚡ e8705650d8 update to version 1.4.2 2026-02-03 11:57:53 +01:00
Vlad Stan 8a9a96a52c chore: clean-up 2026-02-02 15:15:45 +02:00
Vlad Stan ad028b303c refactor: extract private method 2026-02-02 15:13:37 +02:00
dni ⚡ b744af1de5 fix: websocket with old balance was sent 2026-02-02 13:58:07 +01:00
3 changed files with 15 additions and 4 deletions
+13 -2
View File
@@ -776,7 +776,7 @@ async def _pay_internal_invoice(
await update_payment(internal_payment, conn=conn)
logger.success(f"internal payment successful {internal_payment.checking_id}")
send_payment_notification_in_background(wallet, payment)
await _send_payment_notification_in_background(wallet.id, payment, conn=conn)
# notify receiver asynchronously
from lnbits.tasks import internal_invoice_queue
@@ -849,7 +849,8 @@ async def _pay_external_invoice(
payment = await update_payment_success_status(
payment, payment_response, conn=conn
)
send_payment_notification_in_background(wallet, payment)
await _send_payment_notification_in_background(wallet.id, payment, conn=conn)
logger.success(f"payment successful {payment_response.checking_id}")
payment.checking_id = payment_response.checking_id
@@ -1057,3 +1058,13 @@ async def cancel_hold_invoice(payment: Payment) -> InvoiceResponse:
await update_payment(payment)
return response
async def _send_payment_notification_in_background(
wallet_id: str, payment: Payment, conn: Connection | None = None
):
# fetch balance again
wallet = await get_wallet(wallet_id, conn=conn)
if not wallet:
raise PaymentError(f"Could not fetch wallet '{wallet_id}'.", status="failed")
send_payment_notification_in_background(wallet, payment)
+1 -1
View File
@@ -1,6 +1,6 @@
[project]
name = "lnbits"
version = "1.4.1"
version = "1.4.2"
requires-python = ">=3.10,<3.13"
description = "LNbits, free and open-source Lightning wallet and accounts system."
authors = [{ name = "Alan Bits", email = "alan@lnbits.com" }]
Generated
+1 -1
View File
@@ -1247,7 +1247,7 @@ wheels = [
[[package]]
name = "lnbits"
version = "1.4.1"
version = "1.4.2"
source = { editable = "." }
dependencies = [
{ name = "aiosqlite" },