mirror of
https://github.com/lnbits/lnbits.git
synced 2025-09-26 20:06:17 +02:00
Fixed fake invoices registering as paid
This commit is contained in:
@@ -17,7 +17,6 @@ from .base import (
|
|||||||
Wallet,
|
Wallet,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
class FakeWallet(Wallet):
|
class FakeWallet(Wallet):
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
self.amount = 0
|
self.amount = 0
|
||||||
@@ -34,7 +33,7 @@ class FakeWallet(Wallet):
|
|||||||
|
|
||||||
async def status(self) -> StatusResponse:
|
async def status(self) -> StatusResponse:
|
||||||
print(
|
print(
|
||||||
"The FakeWallet backend is for using LNbits as a centralised, stand-alone payment system."
|
"FakeWallet funding source is for using LNbits as a centralised, stand-alone payment system, with brrrrrr."
|
||||||
)
|
)
|
||||||
return StatusResponse(None, float("inf"))
|
return StatusResponse(None, float("inf"))
|
||||||
|
|
||||||
@@ -70,10 +69,10 @@ class FakeWallet(Wallet):
|
|||||||
return PaymentResponse(True, invoice.payment_hash, 0)
|
return PaymentResponse(True, invoice.payment_hash, 0)
|
||||||
|
|
||||||
async def get_invoice_status(self, checking_id: str) -> PaymentStatus:
|
async def get_invoice_status(self, checking_id: str) -> PaymentStatus:
|
||||||
return PaymentStatus(True)
|
return PaymentStatus(False)
|
||||||
|
|
||||||
async def get_payment_status(self, checking_id: str) -> PaymentStatus:
|
async def get_payment_status(self, checking_id: str) -> PaymentStatus:
|
||||||
return PaymentStatus(True)
|
return PaymentStatus(False)
|
||||||
|
|
||||||
async def paid_invoices_stream(self) -> AsyncGenerator[str, None]:
|
async def paid_invoices_stream(self) -> AsyncGenerator[str, None]:
|
||||||
self.queue = asyncio.Queue(0)
|
self.queue = asyncio.Queue(0)
|
||||||
|
Reference in New Issue
Block a user