From 3028bdade142908c9150f3f32003fef625c360f8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?dni=20=E2=9A=A1?= Date: Fri, 12 Apr 2024 12:03:01 +0200 Subject: [PATCH] chore: rename `websocketUpdater` (#78) * chore: rename `websocketUpdater` https://github.com/lnbits/lnbits/pull/2377 --- config.json | 2 +- lnurl.py | 4 ++-- tasks.py | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/config.json b/config.json index 46f6819..10bd4ae 100644 --- a/config.json +++ b/config.json @@ -3,5 +3,5 @@ "short_description": "A shareable PoS terminal!", "tile": "/tpos/static/image/tpos.png", "contributors": ["talvasconcelos", "arcbtc", "leesalminen"], - "min_lnbits_version": "0.11.2" + "min_lnbits_version": "0.12.6" } diff --git a/lnurl.py b/lnurl.py index 29b45c6..61e0042 100644 --- a/lnurl.py +++ b/lnurl.py @@ -2,7 +2,7 @@ from fastapi import Request from typing import Optional from starlette.exceptions import HTTPException -from lnbits.core.services import websocketUpdater, pay_invoice +from lnbits.core.services import websocket_updater, pay_invoice from . import tpos_ext from .crud import get_tpos, get_lnurlcharge, update_lnurlcharge, update_tpos_withdraw @@ -106,7 +106,7 @@ async def lnurl_callback( max_sat=int(lnurlcharge.amount), extra={"tag": "TPoSWithdraw", "tpos_id": lnurlcharge.tpos_id}, ) - await websocketUpdater(k1, "paid") + await websocket_updater(k1, "paid") except Exception as e: raise HTTPException( status_code=HTTPStatus.BAD_REQUEST, detail=f"withdraw not working. {str(e)}" diff --git a/tasks.py b/tasks.py index f619ddb..fe349c7 100644 --- a/tasks.py +++ b/tasks.py @@ -3,7 +3,7 @@ from loguru import logger from lnbits.core.models import Payment -from lnbits.core.services import create_invoice, pay_invoice, websocketUpdater +from lnbits.core.services import create_invoice, pay_invoice, websocket_updater from lnbits.helpers import get_current_extension_name from lnbits.tasks import register_invoice_listener @@ -39,7 +39,7 @@ async def on_invoice_paid(payment: Payment) -> None: tpos = await get_tpos(tpos_id) assert tpos - await websocketUpdater(tpos_id, str(strippedPayment)) + await websocket_updater(tpos_id, str(strippedPayment)) if not tipAmount: # no tip amount