check for amountless invoices deeper in the call stack (#1536)

This commit is contained in:
calle
2023-02-22 13:30:45 +01:00
committed by GitHub
parent 0d5fef1cb9
commit f7e43cdd95

View File

@@ -69,6 +69,10 @@ async def create_invoice(
internal: Optional[bool] = False,
conn: Optional[Connection] = None,
) -> Tuple[str, str]:
if not amount > 0:
raise InvoiceFailure("Amountless invoices not supported.")
invoice_memo = None if description_hash else memo
# use the fake wallet if the invoice is for internal use only