From 00ef27bf8c4b98086a46697df80666245caba511 Mon Sep 17 00:00:00 2001 From: John Colvin Date: Tue, 14 Jul 2020 15:30:24 -0500 Subject: [PATCH] LadderGridHost invalidates '_spec' on connect_vm (not just on settings updates) --- .../spark/Modules/Trading/Ladder/View/LadderGridHost.cs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/client/spark/Modules/Trading/Ladder/View/LadderGridHost.cs b/src/client/spark/Modules/Trading/Ladder/View/LadderGridHost.cs index 7452b07b7..45df06c56 100644 --- a/src/client/spark/Modules/Trading/Ladder/View/LadderGridHost.cs +++ b/src/client/spark/Modules/Trading/Ladder/View/LadderGridHost.cs @@ -816,6 +816,11 @@ namespace mbts.spark { } else { _vm.OnDisposed += _on_vm_disposed; _prices_updated = 0; + // invalidate the contract spec here, as well as in the 'settings update' callback. + // While it is assumed that the settings IObservable will always fire at least once (on subscribe), + // this serves as a redundancy/fail-safe; it ensures that the vm's security's + // contract spec will be used, even if the settings sequence is empty. + _invalidate_spec(); _price_comparer = Comparer.Create((x, y) => _spec.tick_equals(_normalize_price(x), _normalize_price(y)) ? 0 : y.CompareTo(x)); _price_dirty = true; _piq_dirty = true;