Black
This commit is contained in:
@@ -383,6 +383,7 @@ async def check_transaction_status(
|
|||||||
def fee_reserve(amount_msat: int) -> int:
|
def fee_reserve(amount_msat: int) -> int:
|
||||||
return max(int(RESERVE_FEE_MIN), int(amount_msat * RESERVE_FEE_PERCENT / 100.0))
|
return max(int(RESERVE_FEE_MIN), int(amount_msat * RESERVE_FEE_PERCENT / 100.0))
|
||||||
|
|
||||||
|
|
||||||
class websocketConnectionManager:
|
class websocketConnectionManager:
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
self.active_connections: List[WebSocket] = []
|
self.active_connections: List[WebSocket] = []
|
||||||
@@ -400,7 +401,9 @@ class websocketConnectionManager:
|
|||||||
if connection.id == item_id:
|
if connection.id == item_id:
|
||||||
await connection.send_text(message)
|
await connection.send_text(message)
|
||||||
|
|
||||||
|
|
||||||
websocketManager = websocketConnectionManager()
|
websocketManager = websocketConnectionManager()
|
||||||
|
|
||||||
|
|
||||||
async def websocketUpdater(item_id, data):
|
async def websocketUpdater(item_id, data):
|
||||||
return await websocketManager.send_data(f"{data}", item_id)
|
return await websocketManager.send_data(f"{data}", item_id)
|
||||||
@@ -57,7 +57,7 @@ from ..services import (
|
|||||||
pay_invoice,
|
pay_invoice,
|
||||||
perform_lnurlauth,
|
perform_lnurlauth,
|
||||||
websocketManager,
|
websocketManager,
|
||||||
websocketUpdater
|
websocketUpdater,
|
||||||
)
|
)
|
||||||
from ..tasks import api_invoice_listeners
|
from ..tasks import api_invoice_listeners
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user