mirror of
https://github.com/lnbits/lnbits.git
synced 2025-10-09 20:12:34 +02:00
remove unnecessary checking_id from fakewallet
This commit is contained in:
@@ -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:
|
||||||
|
Reference in New Issue
Block a user