guard against amount=NaN in two other lnurlw contexts.

This commit is contained in:
fiatjaf 2021-05-05 09:43:52 -03:00
parent 9b793c9f3a
commit d5f5c9473f
2 changed files with 2 additions and 2 deletions

View file

@ -61,7 +61,7 @@ async def lnurl_callback(track_id):
if not track:
return jsonify({"status": "ERROR", "reason": "Couldn't find track."})
amount_received = int(request.args.get("amount"))
amount_received = int(request.args.get("amount") or 0)
if amount_received < track.min_sendable:
return (

View file

@ -49,7 +49,7 @@ async def lnurl_callback(item_id):
min = price * 995
max = price * 1010
amount_received = int(request.args.get("amount"))
amount_received = int(request.args.get("amount") or 0)
if amount_received < min:
return jsonify(
LnurlErrorResponse(