chore: Improve code comments clarity (#2135)

Signed-off-by: stringscut <stringscut@outlook.jp>
This commit is contained in:
stringscut
2025-12-18 14:17:21 +08:00
committed by GitHub
parent 7f412e2772
commit a2c7837a63
5 changed files with 14 additions and 14 deletions

View File

@@ -499,7 +499,7 @@ func (bt *BackTest) setupExchangeSettings(cfg *config.Config) (*exchange.Exchang
if bt.LiveDataHandler == nil {
err = bt.Funding.AddUSDTrackingData(klineData)
if err != nil &&
!errors.Is(err, trackingcurrencies.ErrCurrencyDoesNotContainsUSD) &&
!errors.Is(err, trackingcurrencies.ErrCurrencyDoesNotContainUSD) &&
!errors.Is(err, funding.ErrUSDTrackingDisabled) {
return nil, err
}

View File

@@ -13,8 +13,8 @@ import (
var (
// ErrCurrencyContainsUSD is raised when the currency already contains a USD equivalent
ErrCurrencyContainsUSD = errors.New("currency already contains a USD equivalent")
// ErrCurrencyDoesNotContainsUSD is raised when the currency does not contain a USD equivalent
ErrCurrencyDoesNotContainsUSD = errors.New("currency does not contains a USD equivalent")
// ErrCurrencyDoesNotContainUSD is raised when the currency does not contain a USD equivalent
ErrCurrencyDoesNotContainUSD = errors.New("currency does not contain a USD equivalent")
errNilPairs = errors.New("cannot assess with nil available pairs")
errNoMatchingPairUSDFound = errors.New("currency pair has no USD backed equivalent, cannot track price")
errCurrencyNotFoundInPairs = errors.New("currency does not exist in available pairs")