This commit is contained in:
dni ⚡ 2023-01-09 16:39:31 +01:00
parent 66c0aac3a1
commit 840de18a91
2 changed files with 2 additions and 4 deletions

View File

@ -118,6 +118,7 @@ async def create_lnurldevicepayment(
sats: Optional[int] = 0,
) -> lnurldevicepayment:
device = await get_lnurldevice(deviceid)
assert device
if device.device == "atm":
lnurldevicepayment_id = shortuuid.uuid(name=payload)
else:

View File

@ -236,13 +236,10 @@ async def lnurl_callback(
else:
if lnurldevicepayment.payload != k1:
return {"status": "ERROR", "reason": "Bad K1"}
<<<<<<< HEAD
lnurldevicepayment = await update_lnurldevicepayment(
=======
if lnurldevicepayment.payhash != "payment_hash":
return {"status": "ERROR", "reason": f"Payment already claimed"}
lnurldevicepayment_updated = await update_lnurldevicepayment(
>>>>>>> c2f4a7c9 (fix mypy lnurldevices issues)
lnurldevicepayment_id=paymentid, payhash=lnurldevicepayment.payload
)
assert lnurldevicepayment_updated