diff --git a/lnbits/bolt11.py b/lnbits/bolt11.py index cc8c6040..cc841585 100644 --- a/lnbits/bolt11.py +++ b/lnbits/bolt11.py @@ -23,7 +23,6 @@ class Route(NamedTuple): class Invoice(object): payment_hash: str - checking_id: Optional[str] = None amount_msat: int = 0 description: Optional[str] = None description_hash: Optional[str] = None diff --git a/lnbits/wallets/fake.py b/lnbits/wallets/fake.py index ba2956c5..3126ee46 100644 --- a/lnbits/wallets/fake.py +++ b/lnbits/wallets/fake.py @@ -80,11 +80,9 @@ class FakeWallet(Wallet): async def pay_invoice(self, bolt11: str, fee_limit_msat: int) -> PaymentResponse: invoice = decode(bolt11) - # TODO: no data here? - data: Dict = {"privkey": "missing"} if ( - invoice.checking_id is not None - and invoice.checking_id[6:] == data["privkey"][:6] + hasattr(invoice, "checking_id") + and invoice.checking_id[6:] == data["privkey"][:6] # type: ignore ): return PaymentResponse(True, invoice.payment_hash, 0) else: