fake wallet queue issue
This commit is contained in:
parent
c3e6ed9089
commit
9e60b5374c
|
@ -47,7 +47,7 @@ def create_app() -> FastAPI:
|
|||
description="API for LNbits, the free and open source bitcoin wallet and accounts system with plugins.",
|
||||
license_info={
|
||||
"name": "MIT License",
|
||||
"url": "https://raw.githubusercontent.com/lnbits/lnbits-legend/main/LICENSE",
|
||||
"url": "https://raw.githubusercontent.com/lnbits/lnbits/main/LICENSE",
|
||||
},
|
||||
)
|
||||
|
||||
|
@ -58,8 +58,6 @@ def create_app() -> FastAPI:
|
|||
name="core_static",
|
||||
)
|
||||
|
||||
# needed for lnurlw?
|
||||
# g().config = settings
|
||||
g().base_url = f"http://{settings.host}:{settings.port}"
|
||||
|
||||
app.add_middleware(
|
||||
|
|
|
@ -19,6 +19,7 @@ from .base import (
|
|||
|
||||
|
||||
class FakeWallet(Wallet):
|
||||
queue: asyncio.Queue = asyncio.Queue(0)
|
||||
secret: str = settings.fake_wallet_secret
|
||||
privkey: str = hashlib.pbkdf2_hmac(
|
||||
"sha256",
|
||||
|
@ -97,7 +98,6 @@ class FakeWallet(Wallet):
|
|||
return PaymentStatus(None)
|
||||
|
||||
async def paid_invoices_stream(self) -> AsyncGenerator[str, None]:
|
||||
self.queue: asyncio.Queue = asyncio.Queue(0)
|
||||
while True:
|
||||
value: Invoice = await self.queue.get()
|
||||
yield value.payment_hash
|
||||
|
|
Loading…
Reference in New Issue
Block a user