mirror of
https://github.com/lnbits/lnbits-legend.git
synced 2024-11-19 18:11:30 +01:00
cln: allow unpaid amountless invoices (#2138)
This commit is contained in:
parent
bff44b7097
commit
abbcfbeb6a
@ -312,8 +312,12 @@ class CoreLightningNode(Node):
|
|||||||
NodeInvoice(
|
NodeInvoice(
|
||||||
bolt11=invoice.get("bolt11") or invoice.get("bolt12"),
|
bolt11=invoice.get("bolt11") or invoice.get("bolt12"),
|
||||||
amount=(
|
amount=(
|
||||||
|
# normal invoice
|
||||||
invoice.get("amount_msat")
|
invoice.get("amount_msat")
|
||||||
|
# keysend or paid amountless invoice
|
||||||
or invoice.get("amount_received_msat")
|
or invoice.get("amount_received_msat")
|
||||||
|
# unpaid amountless invoice
|
||||||
|
or 0
|
||||||
),
|
),
|
||||||
preimage=invoice.get("payment_preimage"),
|
preimage=invoice.get("payment_preimage"),
|
||||||
memo=invoice.get("description"),
|
memo=invoice.get("description"),
|
||||||
|
Loading…
Reference in New Issue
Block a user