Skip to content

Commit

Permalink
fix typo: mininum to minimum
Browse files Browse the repository at this point in the history
  • Loading branch information
bordalix authored and prusnak committed Dec 4, 2024
1 parent e00a81b commit 1d66d2f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions views_lnurl.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,20 +44,20 @@ async def api_lnurl_callback(
)
link.served_pr = 1
await update_pay_link(link)
mininum = link.min
minimum = link.min
maximum = link.max

rate = await get_fiat_rate_satoshis(link.currency) if link.currency else 1
if link.currency:
# allow some fluctuation (as the fiat price may have changed between the calls)
mininum = rate * 995 * link.min
minimum = rate * 995 * link.min
maximum = rate * 1010 * link.max
else:
mininum = link.min * 1000
minimum = link.min * 1000
maximum = link.max * 1000

amount = amount
if amount < mininum:
if amount < minimum:
return LnurlErrorResponse(
reason=f"Amount {amount} is smaller than minimum {min}."
).dict()
Expand Down

0 comments on commit 1d66d2f

Please sign in to comment.