doesnt touch class invoice and leave fake wallet as is

This commit is contained in:
dni 2022-07-26 12:31:01 +02:00
parent 00dba54ac8
commit 7667c2f531
2 changed files with 2 additions and 5 deletions

View File

@ -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

View File

@ -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: