From 55e7c336f95b5d8b549992d1304e41c75ac92abc Mon Sep 17 00:00:00 2001 From: Gareth Kirwan Date: Wed, 27 Nov 2024 18:19:52 +0700 Subject: [PATCH] Linter: Fixes for exchange.go --- exchanges/exchange.go | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/exchanges/exchange.go b/exchanges/exchange.go index a1dbf9da148..2b393a2db2d 100644 --- a/exchanges/exchange.go +++ b/exchanges/exchange.go @@ -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 @@ -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 } }