remove unnecessary checking_id from fakewallet

This commit is contained in:
callebtc 2023-03-02 09:24:42 +01:00 committed by dni ⚡
parent 234b508368
commit a8103ba091
No known key found for this signature in database
GPG key ID: 886317704CC4E618
2 changed files with 1 additions and 2 deletions

View file

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

View file

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