Skip to content

Commit

Permalink
chore: rename websocketUpdater (lnbits#78)
Browse files Browse the repository at this point in the history
* chore: rename `websocketUpdater`
lnbits/lnbits#2377
  • Loading branch information
dni authored Apr 12, 2024
1 parent 66a28c0 commit 3028bda
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion config.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
4 changes: 2 additions & 2 deletions lnurl.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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)}"
Expand Down
4 changes: 2 additions & 2 deletions tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 3028bda

Please sign in to comment.