Fixed daily limit
This commit is contained in:
parent
83605a2524
commit
39800fd5fd
1 changed files with 1 additions and 1 deletions
|
|
@ -85,7 +85,7 @@ async def api_scan(p, c, request: Request, external_id: str = None):
|
||||||
hits_amount = 0
|
hits_amount = 0
|
||||||
for hit in todays_hits:
|
for hit in todays_hits:
|
||||||
hits_amount = hits_amount + hit.amount
|
hits_amount = hits_amount + hit.amount
|
||||||
if (hits_amount + card.tx_limit) > card.daily_limit:
|
if hits_amount > card.daily_limit:
|
||||||
return {"status": "ERROR", "reason": "Max daily limit spent."}
|
return {"status": "ERROR", "reason": "Max daily limit spent."}
|
||||||
hit = await create_hit(card.id, ip, agent, card.counter, ctr_int)
|
hit = await create_hit(card.id, ip, agent, card.counter, ctr_int)
|
||||||
lnurlpay = lnurl_encode(request.url_for("boltcards.lnurlp_response", hit_id=hit.id))
|
lnurlpay = lnurl_encode(request.url_for("boltcards.lnurlp_response", hit_id=hit.id))
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue