mirror of
https://github.com/lnbits/lnbits.git
synced 2025-08-03 15:32:22 +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:
|
||||
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 (
|
||||
|
@@ -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(
|
||||
|
Reference in New Issue
Block a user