Fix message your order is public

This commit is contained in:
Reckless_Satoshi 2022-03-11 07:55:55 -08:00
parent 8001e148d7
commit 408516241d
No known key found for this signature in database
GPG Key ID: 9C4585B561315571

View File

@ -261,6 +261,7 @@ class Logics:
order.taker_bond = None order.taker_bond = None
order.trade_escrow = None order.trade_escrow = None
cls.publish_order(order) cls.publish_order(order)
send_message.delay(order.id,'order_published')
# Reward maker with part of the taker bond # Reward maker with part of the taker bond
cls.add_slashed_rewards(taker_bond, order.maker.profile) cls.add_slashed_rewards(taker_bond, order.maker.profile)
return True return True
@ -290,6 +291,7 @@ class Logics:
order.taker_bond = None order.taker_bond = None
order.trade_escrow = None order.trade_escrow = None
cls.publish_order(order) cls.publish_order(order)
send_message.delay(order.id,'order_published')
# Reward maker with part of the taker bond # Reward maker with part of the taker bond
cls.add_slashed_rewards(taker_bond, order.maker.profile) cls.add_slashed_rewards(taker_bond, order.maker.profile)
return True return True
@ -608,6 +610,7 @@ class Logics:
if valid: if valid:
order.taker = None order.taker = None
cls.publish_order(order) cls.publish_order(order)
send_message.delay(order.id,'order_published')
# Reward maker with part of the taker bond # Reward maker with part of the taker bond
cls.add_slashed_rewards(order.taker_bond, order.maker.profile) cls.add_slashed_rewards(order.taker_bond, order.maker.profile)
return True, None return True, None
@ -659,7 +662,7 @@ class Logics:
order.expires_at = order.created_at + timedelta( order.expires_at = order.created_at + timedelta(
seconds=Order.t_to_expire[Order.Status.PUB]) seconds=Order.t_to_expire[Order.Status.PUB])
order.save() order.save()
send_message.delay(order.id,'order_published') # send_message.delay(order.id,'order_published') # too spammy
return return
@classmethod @classmethod
@ -668,6 +671,7 @@ class Logics:
return True return True
elif LNNode.validate_hold_invoice_locked(order.maker_bond): elif LNNode.validate_hold_invoice_locked(order.maker_bond):
cls.publish_order(order) cls.publish_order(order)
send_message.delay(order.id,'order_published')
return True return True
return False return False