From f7e43cdd950f34e3faddf167d30916f965491963 Mon Sep 17 00:00:00 2001 From: calle <93376500+callebtc@users.noreply.github.com> Date: Wed, 22 Feb 2023 13:30:45 +0100 Subject: [PATCH] check for amountless invoices deeper in the call stack (#1536) --- lnbits/core/services.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lnbits/core/services.py b/lnbits/core/services.py index f5bf0b469..b57883001 100644 --- a/lnbits/core/services.py +++ b/lnbits/core/services.py @@ -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