Black
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user