|
|
@ -39,11 +39,14 @@ async def api_lnurl_callback(link_id): |
|
|
|
return jsonify({"status": "ERROR", "reason": "LNURL-pay not found."}), HTTPStatus.OK |
|
|
|
|
|
|
|
min, max = link.min, link.max |
|
|
|
rate = await get_fiat_rate(link.currency) if link.currency else 1000 |
|
|
|
rate = await get_fiat_rate(link.currency) if link.currency else 1 |
|
|
|
if link.currency: |
|
|
|
# allow some fluctuation (as the fiat price may have changed between the calls) |
|
|
|
min = rate * 995 * link.min |
|
|
|
max = rate * 1010 * link.max |
|
|
|
else: |
|
|
|
min = link.min * 1000 |
|
|
|
max = link.max * 1000 |
|
|
|
|
|
|
|
amount_received = int(request.args.get("amount")) |
|
|
|
if amount_received < min: |
|
|
|