From f478b2c9f2d2eae63f5f0f5394a0fef1cb8f3ec1 Mon Sep 17 00:00:00 2001 From: John Colvin Date: Tue, 30 Apr 2019 18:24:05 -0500 Subject: [PATCH] SPARK-2355 Attaching to a running studio algo results in the wrong order type being displayed --- src/client/spark/Modules/Trading/OrderBook/OrderBookVM.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/client/spark/Modules/Trading/OrderBook/OrderBookVM.cs b/src/client/spark/Modules/Trading/OrderBook/OrderBookVM.cs index b8117c6f7..0a238eba4 100644 --- a/src/client/spark/Modules/Trading/OrderBook/OrderBookVM.cs +++ b/src/client/spark/Modules/Trading/OrderBook/OrderBookVM.cs @@ -245,8 +245,8 @@ namespace mbts.spark { double price = attach_vm.price; uint size = attach_vm.size ?? 0; var algo = attach_vm.algo_vm.algo_root.created_assigned(); - var order_tups = selected_rows.Select(r => r.order_tuple).ToList(); - uint? algo_template_key = attach_vm.algo_vm.algo_root.id.is_persisted ? attach_vm.algo_vm.algo_root.id.persisted.id_uint : (uint?)null; + var order_tups = selected_rows.Select(r => r.order_tuple).ToList(); + uint algo_template_key = attach_vm.algo_vm.algo_root.id.is_persisted ? attach_vm.algo_vm.algo_root.id.persisted.id_uint : 0u; await Task.WhenAll(order_tups.Select(t => _model.send_order(t.order.Def.with(attach_target_order_key: t.order.Key, custom_def: algo, algo_template_key: algo_template_key), price, size))); } catch (Exception ex) { Log.Ui.error($"Error sending attached orders: {ex}.");