parent
b985304384
commit
082f5e7488
1 changed files with 4 additions and 3 deletions
|
|
@ -179,9 +179,10 @@ async def api_ticket_send_ticket(event_id, payment_hash):
|
||||||
else await fiat_amount_as_satoshis(event.price_per_ticket, event.currency)
|
else await fiat_amount_as_satoshis(event.price_per_ticket, event.currency)
|
||||||
* 1000
|
* 1000
|
||||||
)
|
)
|
||||||
if (
|
# check if price is equal to payment.amount
|
||||||
not payment.pending and abs(price - payment.amount) < price * 0.01
|
lower_bound = price * 0.99 # 1% decrease
|
||||||
): # allow 1% error
|
|
||||||
|
if not payment.pending and abs(payment.amount) >= lower_bound: # allow 1% error
|
||||||
await set_ticket_paid(payment_hash)
|
await set_ticket_paid(payment_hash)
|
||||||
return {"paid": True, "ticket_id": ticket.id}
|
return {"paid": True, "ticket_id": ticket.id}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue