fi: restore parameter when update active orde book

This commit is contained in:
anywhy 2024-03-14 14:48:15 +08:00
parent 3a98660e0c
commit 9f50e256c8

View File

@ -268,6 +268,10 @@ func (b *ActiveOrderBook) GracefulCancel(ctx context.Context, ex types.Exchange,
}
func (b *ActiveOrderBook) orderUpdateHandler(order types.Order) {
if oldOrder, ok := b.Get(order.OrderID); ok {
order.Tag = oldOrder.Tag
order.GroupID = oldOrder.GroupID
}
b.Update(order)
}