Skip to content

Commit

Permalink
xnav: rename Ten to ten
Browse files Browse the repository at this point in the history
  • Loading branch information
c9s committed Dec 14, 2024
1 parent e3972e0 commit 8a46033
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/strategy/xnav/strategy.go
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ func (s *Strategy) Validate() error {
return nil
}

var Ten = fixedpoint.NewFromInt(10)
var ten = fixedpoint.NewFromInt(10)

func (s *Strategy) CrossSubscribe(sessions map[string]*bbgo.ExchangeSession) {}

Expand Down Expand Up @@ -134,7 +134,7 @@ func (s *Strategy) recordNetAssetValue(ctx context.Context, sessions map[string]

for currency, asset := range totalAssets {
// calculated if it's dust only when InUSD (usd value) is defined.
if s.IgnoreDusts && !asset.InUSD.IsZero() && asset.InUSD.Compare(Ten) < 0 && asset.InUSD.Compare(Ten.Neg()) > 0 {
if s.IgnoreDusts && !asset.InUSD.IsZero() && asset.InUSD.Compare(ten) < 0 && asset.InUSD.Compare(ten.Neg()) > 0 {
continue
}

Expand Down

0 comments on commit 8a46033

Please sign in to comment.