diff --git a/lnbits/core/views/api.py b/lnbits/core/views/api.py index bd15ee8d6..09eb4f906 100644 --- a/lnbits/core/views/api.py +++ b/lnbits/core/views/api.py @@ -181,7 +181,7 @@ async def api_payments_create_invoice(data: CreateInvoiceData, wallet: Wallet): lnurl_response: Union[None, bool, str] = None if data.lnurl_callback: - if "lnurl_balance_check" in data: + if hasattr(data, "lnurl_balance_check"): assert ( data.lnurl_balance_check is not None ), "lnurl_balance_check is required" @@ -248,7 +248,7 @@ async def api_payments_pay_invoice(bolt11: str, wallet: Wallet): ) async def api_payments_create( wallet: WalletTypeInfo = Depends(require_invoice_key), - invoiceData: CreateInvoiceData = Body(...), + invoiceData = Body(...), ): if invoiceData.out is True and wallet.wallet_type == 0: if not invoiceData.bolt11: diff --git a/lnbits/wallets/eclair.py b/lnbits/wallets/eclair.py index bad707ff1..b669f8b74 100644 --- a/lnbits/wallets/eclair.py +++ b/lnbits/wallets/eclair.py @@ -9,7 +9,8 @@ import httpx from loguru import logger # mypy https://github.com/aaugustin/websockets/issues/940 -from websockets.client import connect +# from websockets.client import connect +from websockets import connect from websockets.exceptions import ( ConnectionClosed, ConnectionClosedError,