From d78e0c607aa120f4961160edf743f9f8119a7226 Mon Sep 17 00:00:00 2001 From: c9s Date: Wed, 4 May 2022 14:46:05 +0800 Subject: [PATCH] xnav: pass session to the record assets method call --- pkg/strategy/xnav/strategy.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/strategy/xnav/strategy.go b/pkg/strategy/xnav/strategy.go index ac801446d..8a135c9e0 100644 --- a/pkg/strategy/xnav/strategy.go +++ b/pkg/strategy/xnav/strategy.go @@ -110,7 +110,7 @@ func (s *Strategy) recordNetAssetValue(ctx context.Context, sessions map[string] allPrices[m] = p } - s.Environment.RecordAsset(priceTime, sessionName, session.ExchangeName, session.SubAccount, assets) + s.Environment.RecordAsset(priceTime, session, assets) } assets := totalBalances.Assets(allPrices, time.Now()) @@ -123,7 +123,7 @@ func (s *Strategy) recordNetAssetValue(ctx context.Context, sessions map[string] totalAssets[currency] = asset } - s.Environment.RecordAsset(priceTime, "ALL", "", "", totalAssets) + s.Environment.RecordAsset(priceTime, &bbgo.ExchangeSession{Name: "ALL"}, totalAssets) s.Notifiability.Notify(totalAssets)