remove unnecessary checking_id from fakewallet
This commit is contained in:
parent
234b508368
commit
a8103ba091
2 changed files with 1 additions and 2 deletions
|
|
@ -30,7 +30,6 @@ class Invoice:
|
||||||
secret: Optional[str] = None
|
secret: Optional[str] = None
|
||||||
route_hints: List[Route] = []
|
route_hints: List[Route] = []
|
||||||
min_final_cltv_expiry: int = 18
|
min_final_cltv_expiry: int = 18
|
||||||
checking_id: Optional[str] = None
|
|
||||||
|
|
||||||
|
|
||||||
def decode(pr: str) -> Invoice:
|
def decode(pr: str) -> Invoice:
|
||||||
|
|
|
||||||
|
|
@ -80,7 +80,7 @@ class FakeWallet(Wallet):
|
||||||
async def pay_invoice(self, bolt11: str, _: int) -> PaymentResponse:
|
async def pay_invoice(self, bolt11: str, _: int) -> PaymentResponse:
|
||||||
invoice = decode(bolt11)
|
invoice = decode(bolt11)
|
||||||
|
|
||||||
if invoice.checking_id and invoice.checking_id[:6] == self.privkey[:6]:
|
if invoice.payment_hash[:6] == self.privkey[:6]:
|
||||||
await self.queue.put(invoice)
|
await self.queue.put(invoice)
|
||||||
return PaymentResponse(True, invoice.payment_hash, 0)
|
return PaymentResponse(True, invoice.payment_hash, 0)
|
||||||
else:
|
else:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue