doesnt touch class invoice and leave fake wallet as is
This commit is contained in:
parent
00dba54ac8
commit
7667c2f531
|
@ -23,7 +23,6 @@ class Route(NamedTuple):
|
||||||
|
|
||||||
class Invoice(object):
|
class Invoice(object):
|
||||||
payment_hash: str
|
payment_hash: str
|
||||||
checking_id: Optional[str] = None
|
|
||||||
amount_msat: int = 0
|
amount_msat: int = 0
|
||||||
description: Optional[str] = None
|
description: Optional[str] = None
|
||||||
description_hash: Optional[str] = None
|
description_hash: Optional[str] = None
|
||||||
|
|
|
@ -80,11 +80,9 @@ class FakeWallet(Wallet):
|
||||||
|
|
||||||
async def pay_invoice(self, bolt11: str, fee_limit_msat: int) -> PaymentResponse:
|
async def pay_invoice(self, bolt11: str, fee_limit_msat: int) -> PaymentResponse:
|
||||||
invoice = decode(bolt11)
|
invoice = decode(bolt11)
|
||||||
# TODO: no data here?
|
|
||||||
data: Dict = {"privkey": "missing"}
|
|
||||||
if (
|
if (
|
||||||
invoice.checking_id is not None
|
hasattr(invoice, "checking_id")
|
||||||
and invoice.checking_id[6:] == data["privkey"][:6]
|
and invoice.checking_id[6:] == data["privkey"][:6] # type: ignore
|
||||||
):
|
):
|
||||||
return PaymentResponse(True, invoice.payment_hash, 0)
|
return PaymentResponse(True, invoice.payment_hash, 0)
|
||||||
else:
|
else:
|
||||||
|
|
Loading…
Reference in New Issue
Block a user