From 2ccce12cbf179a5de1365ee00ca8010fa9e9411a Mon Sep 17 00:00:00 2001 From: Andy Cheng Date: Mon, 10 Jul 2023 15:50:18 +0800 Subject: [PATCH] improve/profitStatsTracker: temporarily remove lines relate to time in profit stats --- .../{profit_tracker.go => profit_stats_tracker.go} | 0 pkg/types/profit.go | 10 +++++----- 2 files changed, 5 insertions(+), 5 deletions(-) rename pkg/report/{profit_tracker.go => profit_stats_tracker.go} (100%) diff --git a/pkg/report/profit_tracker.go b/pkg/report/profit_stats_tracker.go similarity index 100% rename from pkg/report/profit_tracker.go rename to pkg/report/profit_stats_tracker.go diff --git a/pkg/types/profit.go b/pkg/types/profit.go index aa57b2e22..c7742e0b8 100644 --- a/pkg/types/profit.go +++ b/pkg/types/profit.go @@ -165,8 +165,8 @@ type ProfitStats struct { TodayGrossLoss fixedpoint.Value `json:"todayGrossLoss,omitempty"` TodaySince int64 `json:"todaySince,omitempty"` - startTime time.Time - endTime time.Time + //StartTime time.Time + //EndTime time.Time } func NewProfitStats(market Market) *ProfitStats { @@ -185,8 +185,8 @@ func NewProfitStats(market Market) *ProfitStats { TodayGrossProfit: fixedpoint.Zero, TodayGrossLoss: fixedpoint.Zero, TodaySince: 0, - startTime: time.Now().UTC(), - endTime: time.Now().UTC(), + //StartTime: time.Now().UTC(), + //EndTime: time.Now().UTC(), } } @@ -229,7 +229,7 @@ func (s *ProfitStats) AddProfit(profit Profit) { s.TodayGrossLoss = s.TodayGrossLoss.Add(profit.Profit) } - s.endTime = profit.TradedAt.UTC() + //s.EndTime = profit.TradedAt.UTC() } func (s *ProfitStats) AddTrade(trade Trade) {