Skip to content

Commit

Permalink
Nostr order should hide when a taker sends the action
Browse files Browse the repository at this point in the history
  • Loading branch information
KoalaSat committed Nov 6, 2024
1 parent 054093d commit 925a194
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions api/logics.py
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,9 @@ def take(cls, order, user, amount=None):
seconds=order.t_to_expire(Order.Status.TAK)
)
order.save(update_fields=["amount", "taker", "expires_at"])

nostr_send_order_event.delay(order_id=order.id)

order.log(
f"Taken by Robot({user.robot.id},{user.username}) for {order.amount} fiat units"
)
Expand Down Expand Up @@ -293,6 +296,8 @@ def order_expires(cls, order):
cls.cancel_bond(order.taker_bond)
cls.kick_taker(order)

nostr_send_order_event.delay(order_id=order.id)

order.log("Order expired while waiting for taker bond")
order.log("Taker bond was cancelled")

Expand Down

0 comments on commit 925a194

Please sign in to comment.