You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[BUG] Receiver gets every notification twice for internal payments #4147
Describe the bug
When a wallet pays an invoice from another wallet on the same LNbits instance, the receiving wallet gets every notification two times. The webhook of the invoice is called twice. The websocket, Telegram, Nostr, email and push notifications are also sent twice. Payments from an external node are fine, only internal payments do this.
To Reproduce
Create two wallets on one instance, wallet A and wallet B.
In wallet B create an invoice with a webhook URL.
Pay the invoice from wallet A.
The webhook server gets two POST requests for the same payment.
Expected behavior
One notification per payment.
Screenshots
Log of my test webhook server, one payment:
21:51:22.281 POST /hook {"checking_id": "bbc5f289474a5361...
21:51:22.288 POST /hook {"checking_id": "bbc5f289474a5361...
Desktop (please complete the following information):
Additional context
In lnbits/core/services/payments.py, _pay_internal_invoice calls _send_payment_notification_in_background for the receiver and then also puts the payment on internal_invoice_queue. The core listener dispatch_payment_notification from lnbits/app.py reads that queue and sends the same notifications again.
Activity