cln: allow unpaid amountless invoices (#2138)

This commit is contained in:
Kalle Rosenbaum 2023-12-19 12:12:52 +01:00 committed by GitHub
parent bff44b7097
commit abbcfbeb6a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -312,8 +312,12 @@ class CoreLightningNode(Node):
NodeInvoice(
bolt11=invoice.get("bolt11") or invoice.get("bolt12"),
amount=(
# normal invoice
invoice.get("amount_msat")
# keysend or paid amountless invoice
or invoice.get("amount_received_msat")
# unpaid amountless invoice
or 0
),
preimage=invoice.get("payment_preimage"),
memo=invoice.get("description"),