diff --git a/lnbits/bolt11.py b/lnbits/bolt11.py index 99cf81f23..e09fb9d98 100644 --- a/lnbits/bolt11.py +++ b/lnbits/bolt11.py @@ -91,17 +91,12 @@ def decode(pr: str) -> Invoice: elif tag == "r": s = bitstring.ConstBitStream(tagdata) while s.pos + 264 + 64 + 32 + 32 + 16 < s.len: - pubkey = s.read(264) # type: ignore - short_channel_id = s.read(64) # type: ignore - base_fee_msat = s.read(32) # type: ignore - ppm_fee = s.read(32) # type: ignore - cltv = s.read(16) # type: ignore route = Route( - pubkey=pubkey.tobytes().hex(), - short_channel_id=_readable_scid(short_channel_id.intbe), - base_fee_msat=base_fee_msat.intbe, - ppm_fee=ppm_fee.intbe, - cltv=cltv.intbe, + pubkey=s.read(264).tobytes().hex(), # type: ignore + short_channel_id=_readable_scid(s.read(64).intbe), # type: ignore + base_fee_msat=s.read(32).intbe, # type: ignore + ppm_fee=s.read(32).intbe, # type: ignore + cltv=s.read(16).intbe, # type: ignore ) invoice.route_hints.append(route) diff --git a/lnbits/db.py b/lnbits/db.py index 4b50b82c7..4a6673a7c 100644 --- a/lnbits/db.py +++ b/lnbits/db.py @@ -185,7 +185,7 @@ class Database(Compat): async def connect(self): await self.lock.acquire() try: - async with self.engine.connect() as conn: + async with self.engine.connect() as conn: # type: ignore async with conn.begin() as txn: wconn = Connection(conn, txn, self.type, self.name, self.schema) diff --git a/lnbits/wallets/cln.py b/lnbits/wallets/cln.py index 642aef508..79079784b 100644 --- a/lnbits/wallets/cln.py +++ b/lnbits/wallets/cln.py @@ -1,3 +1,4 @@ +# type: ignore try: from pyln.client import LightningRpc, RpcError # type: ignore except ImportError: # pragma: nocover