Fix early bond expiration

This commit is contained in:
koalasat
2025-03-04 13:09:28 +01:00
parent 0a8d648fa4
commit 537707d464

View File

@ -1375,8 +1375,7 @@ class Logics:
order.maker.robot.save(update_fields=["total_contracts"])
order.taker.robot.save(update_fields=["total_contracts"])
take_order.expires_at = timezone.now()
take_order.save(update_fields=["expires_at"])
take_order.delete()
# Log a market tick
try:
@ -1477,7 +1476,7 @@ class Logics:
)
order.log(
f"Taker bond invoice LNPayment({hold_payment['payment_hash']},{str(order.taker_bond)}) was created"
f"Taker bond invoice LNPayment({hold_payment['payment_hash']},{str(take_order.taker_bond)}) was created"
)
return True, {