remove unusued method 'OrderBookVM._attach_orders'
This commit is contained in:
1 parent
398382c3a5
commit
aefe248034
1 file changed
-16
@@ -544,22 +544,6 @@ namespace mbts.spark {
|
||||
}
|
||||
}
|
||||
|
||||
async Task _attach_orders(IReadOnlyList<OrderBookRowVM> rows, OrderBookRowVM target) {
|
||||
Log.Ui.info($"{nameof(OrderBookVM)} begin attaching orders ({rows.Count} total)...");
|
||||
try {
|
||||
await Task.WhenAll(rows.Select(r => _model.cancel_order(r.order_key)));
|
||||
} catch (Exception ex) {
|
||||
Log.Ui.error($"Error canceling orders, in advance of attachment: {ex}.");
|
||||
}
|
||||
Log.Ui.info($"{nameof(OrderBookVM)} succesfully canceled orders ({rows.Count} total), in advance of attachment. Begin sending attached orders ({rows.Count} total)...");
|
||||
try {
|
||||
await Task.WhenAll(rows.Select(r => _model.send_order(r.order.Def.with(attach_target_order_key: target.order_key), r.order.State.Price, (uint)r.order.working_quantity())));
|
||||
} catch (Exception ex) {
|
||||
Log.Ui.error($"Error sending attached orders: {ex}.");
|
||||
}
|
||||
Log.Ui.info($"{nameof(OrderBookVM)} succesfully sent attached orders ({rows.Count} total).");
|
||||
}
|
||||
|
||||
async Task _detach_orders_async(IEnumerable<OrderBookRowVM> detach_candidates) =>
|
||||
await _detach_orders_async(new HashSet<uint>(detach_candidates.Where(r => r.is_detachable).Select(r => r.parent_order_key)));
|
||||
|
||||
|
||||
Reference in new issue
Block a user