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}.");