mirror of
https://github.com/lnbits/lnbits.git
synced 2025-07-12 14:02:37 +02:00
mypy fixes, api, eclair
This commit is contained in:
@ -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:
|
||||
|
@ -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,
|
||||
|
Reference in New Issue
Block a user