mirror of
https://github.com/lnbits/lnbits-legend.git
synced 2024-11-19 18:11:30 +01:00
Black
This commit is contained in:
parent
f876f0659f
commit
c2a737ab84
@ -383,6 +383,7 @@ async def check_transaction_status(
|
||||
def fee_reserve(amount_msat: int) -> int:
|
||||
return max(int(RESERVE_FEE_MIN), int(amount_msat * RESERVE_FEE_PERCENT / 100.0))
|
||||
|
||||
|
||||
class websocketConnectionManager:
|
||||
def __init__(self):
|
||||
self.active_connections: List[WebSocket] = []
|
||||
@ -400,7 +401,9 @@ class websocketConnectionManager:
|
||||
if connection.id == item_id:
|
||||
await connection.send_text(message)
|
||||
|
||||
|
||||
websocketManager = websocketConnectionManager()
|
||||
|
||||
|
||||
async def websocketUpdater(item_id, data):
|
||||
return await websocketManager.send_data(f"{data}", item_id)
|
||||
return await websocketManager.send_data(f"{data}", item_id)
|
||||
|
@ -90,4 +90,4 @@ async def mark_webhook_sent(payment: Payment, status: int) -> None:
|
||||
WHERE hash = ?
|
||||
""",
|
||||
(status, payment.payment_hash),
|
||||
)
|
||||
)
|
||||
|
@ -56,8 +56,8 @@ from ..services import (
|
||||
create_invoice,
|
||||
pay_invoice,
|
||||
perform_lnurlauth,
|
||||
websocketManager,
|
||||
websocketUpdater
|
||||
websocketManager,
|
||||
websocketUpdater,
|
||||
)
|
||||
from ..tasks import api_invoice_listeners
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user