Merge pull request #29 from lnbits/fix_key_based_sending
Some checks failed
/ release (push) Has been cancelled
/ pullrequest (push) Has been cancelled

Fix: Keys were not working for splits
This commit is contained in:
Arc 2025-02-12 13:49:21 +00:00 committed by GitHub
commit abe8250839
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -6,6 +6,7 @@ from typing import Optional
import bolt11
import httpx
from lnbits.core.crud import get_standalone_payment
from lnbits.core.crud.wallets import get_wallet_for_key
from lnbits.core.models import Payment
from lnbits.core.services import create_invoice, fee_reserve, pay_invoice
from lnbits.tasks import register_invoice_listener
@ -56,6 +57,9 @@ async def on_invoice_paid(payment: Payment) -> None:
target.wallet, payment.wallet_id, safe_amount_msat, memo
)
else:
wallet = await get_wallet_for_key(target.wallet)
if wallet is not None:
target.wallet = wallet.id
new_payment = await create_invoice(
wallet_id=target.wallet,
amount=int(amount_msat / 1000),