Skip to content

Commit

Permalink
Linter: Fixes for exchange.go
Browse files Browse the repository at this point in the history
  • Loading branch information
gbjk committed Nov 27, 2024
1 parent ca6aa14 commit 55e7c33
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions exchanges/exchange.go
Original file line number Diff line number Diff line change
Expand Up @@ -330,10 +330,12 @@ func (b *Base) SetConfigPairs() error {
}

if b.Config.CurrencyPairs.UseGlobalFormat {
if err = b.CurrencyPairs.StorePairs(assetTypes[x], cfgPS.Available, false); err != nil {
err := b.CurrencyPairs.StorePairs(assetTypes[x], cfgPS.Available, false)
if err != nil {
return err
}
if err = b.CurrencyPairs.StorePairs(assetTypes[x], cfgPS.Enabled, true); err != nil {
err = b.CurrencyPairs.StorePairs(assetTypes[x], cfgPS.Enabled, true)
if err != nil {
return err
}
continue
Expand All @@ -344,20 +346,20 @@ func (b *Base) SetConfigPairs() error {
}

if exchPS.ConfigFormat != nil {
if err = b.Config.CurrencyPairs.StoreFormat(assetTypes[x], exchPS.ConfigFormat, true); err != nil {
if err := b.Config.CurrencyPairs.StoreFormat(assetTypes[x], exchPS.ConfigFormat, true); err != nil {
return err
}
}
if exchPS.RequestFormat != nil {
if err = b.Config.CurrencyPairs.StoreFormat(assetTypes[x], exchPS.RequestFormat, false); err != nil {
if err := b.Config.CurrencyPairs.StoreFormat(assetTypes[x], exchPS.RequestFormat, false); err != nil {
return err
}
}

if err = b.CurrencyPairs.StorePairs(assetTypes[x], cfgPS.Available, false); err != nil {
if err := b.CurrencyPairs.StorePairs(assetTypes[x], cfgPS.Available, false); err != nil {
return err
}
if err = b.CurrencyPairs.StorePairs(assetTypes[x], cfgPS.Enabled, true); err != nil {
if err := b.CurrencyPairs.StorePairs(assetTypes[x], cfgPS.Enabled, true); err != nil {
return err
}
}
Expand Down

0 comments on commit 55e7c33

Please sign in to comment.