mirror of
https://github.com/lnbits/lnbits.git
synced 2025-09-28 21:02:31 +02:00
check for amountless invoices deeper in the call stack (#1536)
This commit is contained in:
@@ -69,6 +69,10 @@ async def create_invoice(
|
|||||||
internal: Optional[bool] = False,
|
internal: Optional[bool] = False,
|
||||||
conn: Optional[Connection] = None,
|
conn: Optional[Connection] = None,
|
||||||
) -> Tuple[str, str]:
|
) -> Tuple[str, str]:
|
||||||
|
|
||||||
|
if not amount > 0:
|
||||||
|
raise InvoiceFailure("Amountless invoices not supported.")
|
||||||
|
|
||||||
invoice_memo = None if description_hash else memo
|
invoice_memo = None if description_hash else memo
|
||||||
|
|
||||||
# use the fake wallet if the invoice is for internal use only
|
# use the fake wallet if the invoice is for internal use only
|
||||||
|
Reference in New Issue
Block a user