mirror of
https://github.com/lnbits/lnbits.git
synced 2025-08-08 09:11:56 +02:00
guard against amount=NaN in two other lnurlw contexts.
This commit is contained in:
@@ -61,7 +61,7 @@ async def lnurl_callback(track_id):
|
|||||||
if not track:
|
if not track:
|
||||||
return jsonify({"status": "ERROR", "reason": "Couldn't find 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:
|
if amount_received < track.min_sendable:
|
||||||
return (
|
return (
|
||||||
|
@@ -49,7 +49,7 @@ async def lnurl_callback(item_id):
|
|||||||
min = price * 995
|
min = price * 995
|
||||||
max = price * 1010
|
max = price * 1010
|
||||||
|
|
||||||
amount_received = int(request.args.get("amount"))
|
amount_received = int(request.args.get("amount") or 0)
|
||||||
if amount_received < min:
|
if amount_received < min:
|
||||||
return jsonify(
|
return jsonify(
|
||||||
LnurlErrorResponse(
|
LnurlErrorResponse(
|
||||||
|
Reference in New Issue
Block a user