diff --git a/src/client/spark/Modules/Trading/PNL/VM/PNLVM.cs b/src/client/spark/Modules/Trading/PNL/VM/PNLVM.cs index a23bff661..d3330b0ce 100644 --- a/src/client/spark/Modules/Trading/PNL/VM/PNLVM.cs +++ b/src/client/spark/Modules/Trading/PNL/VM/PNLVM.cs @@ -128,8 +128,9 @@ _dispose = Disposable.Create( position_model.security_account_pnl.Operate( _calculation_type.observe_current(true), - (data, calc) => data.with(calc_type: calc) - ).FilterWithRaw(filter_src, PNLRowData.key_fn, null) + (data, calc) => data.with(calc_type: calc), + PNLRowData.key_fn) + .FilterWithRaw(filter_src, PNLRowData.key_fn, null) .OnDispatcher() .Subscribe(_update), _symbols_source(position_model.security_account_pnl).OnDispatcher().Subscribe(symbol_filter_items_observer), diff --git a/src/client/spark_api/api/Update/UpdateExtensions.cs b/src/client/spark_api/api/Update/UpdateExtensions.cs index adda29019..04a9938ff 100644 --- a/src/client/spark_api/api/Update/UpdateExtensions.cs +++ b/src/client/spark_api/api/Update/UpdateExtensions.cs @@ -500,6 +500,7 @@ namespace bts.api.core { this IObservable> source, IObservable param_source, Func operate, + Func key_fn, TParam init_param = default ) where TKey : IEquatable { return AggregateLatest( @@ -507,8 +508,8 @@ namespace bts.api.core { param_source, on_left, on_right, - () => TableUpdate.empty, - TableUpdate.empty, + () => TableUpdate.mk_empty(key_fn), + TableUpdate.mk_empty(key_fn), init_param); TableUpdate on_left(