From 7667c2f5318286fd54271dbe4be62fc62e7a1308 Mon Sep 17 00:00:00 2001 From: dni Date: Tue, 26 Jul 2022 12:31:01 +0200 Subject: [PATCH] doesnt touch class invoice and leave fake wallet as is --- lnbits/bolt11.py | 1 - lnbits/wallets/fake.py | 6 ++---- 2 files changed, 2 insertions(+), 5 deletions(-) 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: