Skip to content

Commit

Permalink
some mypy fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
arcbtc committed Oct 7, 2024
1 parent a996a85 commit 250e5cc
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion views_lnurl.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,11 @@ async def lnurl_params(

# Check they're not trying to trick the switch!
check = False
if device.extra and "atm" not in device.extra:
if (
device.extra
and not isinstance(device.extra, str)
and "atm" not in device.extra
):
for extra in device.extra:
if (
extra.pin == int(pin)
Expand Down Expand Up @@ -143,6 +147,9 @@ async def lnurl_params(
if device.currency != "sat"
else amount_in_cent
)
if price_msat is None:
return {"status": "ERROR", "reason": "Price fetch error."}


if atm:
lnurldevicepayment, price_msat = await register_atm_payment(device, p)
Expand Down

0 comments on commit 250e5cc

Please sign in to comment.