Composite order was not reflecting child price/size
This commit is contained in:
1 parent
43336d04d4
commit
df6a5096c2
1 file changed
+3
@@ -102,6 +102,8 @@ OrderOpResult CompositeOrder::on_update(Price p, Quantity q) {
|
||||
|
||||
OrderOpResult CompositeOrder::on_update(api::orderman::Update const &u) {
|
||||
if (!me->child_order.empty()) {
|
||||
me->state.set_price(u.price());
|
||||
me->state.set_quantity(u.quantity());
|
||||
Update child_update;
|
||||
child_update.set_price(u.price());
|
||||
child_update.set_quantity(u.quantity());
|
||||
@@ -113,6 +115,7 @@ OrderOpResult CompositeOrder::on_update(api::orderman::Update const &u) {
|
||||
*child_update.mutable_custom() = cupdate;
|
||||
}
|
||||
me->child_order.update(child_update);
|
||||
me->services->report_state(me->state);
|
||||
}
|
||||
return {};
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user