Merge pull request #1601 from RoboSats/nostr-order-should-hide-when-taker-action

Nostr order should hide when a taker sends the action
This commit is contained in:
KoalaSat 2024-11-08 11:26:33 +00:00 committed by GitHub
commit f353e97588
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -185,6 +185,9 @@ class Logics:
seconds=order.t_to_expire(Order.Status.TAK) seconds=order.t_to_expire(Order.Status.TAK)
) )
order.save(update_fields=["amount", "taker", "expires_at"]) order.save(update_fields=["amount", "taker", "expires_at"])
nostr_send_order_event.delay(order_id=order.id)
order.log( order.log(
f"Taken by Robot({user.robot.id},{user.username}) for {order.amount} fiat units" f"Taken by Robot({user.robot.id},{user.username}) for {order.amount} fiat units"
) )
@ -293,6 +296,8 @@ class Logics:
cls.cancel_bond(order.taker_bond) cls.cancel_bond(order.taker_bond)
cls.kick_taker(order) cls.kick_taker(order)
nostr_send_order_event.delay(order_id=order.id)
order.log("Order expired while waiting for taker bond") order.log("Order expired while waiting for taker bond")
order.log("Taker bond was cancelled") order.log("Taker bond was cancelled")