From 95ae7b780e950047bcd70db1256b95ae1a606d39 Mon Sep 17 00:00:00 2001 From: Pedro Pinto Date: Thu, 27 Dec 2018 21:35:18 +0000 Subject: [PATCH] Propagated display status through order state update event. --- src/lib/orderman/events/OrderStateUpdateEvent.h | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/lib/orderman/events/OrderStateUpdateEvent.h b/src/lib/orderman/events/OrderStateUpdateEvent.h index 678b5f9c9..38ea850b4 100644 --- a/src/lib/orderman/events/OrderStateUpdateEvent.h +++ b/src/lib/orderman/events/OrderStateUpdateEvent.h @@ -25,8 +25,10 @@ class OrderStateUpdateEvent : public mercury::Event { last_price = state.last_price(); avg_price = state.avg_price(); last_msg = state.last_msg(); + display_status = state.display_status(); + custom = state.custom_case(); - + auto native_state = get_native_state(state); if (native_state) { exchange_order_id = native_state->exchange_order_id(); @@ -50,7 +52,8 @@ class OrderStateUpdateEvent : public mercury::Event { double last_price; double avg_price; std::string last_msg; - + api::orderman::OrderState::DisplayStatus display_status; + trace::CorID trace; api::orderman::OrderState::CustomCase custom; @@ -74,7 +77,8 @@ class OrderStateUpdateEvent : public mercury::Event { result.set_last_price(last_price); result.set_avg_price(avg_price); result.set_last_msg(last_msg); - + result.set_display_status(display_status); + switch (custom) { case api::orderman::OrderState::kMarket: rebuild_native_state(result.mutable_market()->mutable_native_state());