diff --git a/cmd/exchange_wrapper_standards/exchange_wrapper_standards_test.go b/cmd/exchange_wrapper_standards/exchange_wrapper_standards_test.go index 622a7e37547..1d5749e379d 100644 --- a/cmd/exchange_wrapper_standards/exchange_wrapper_standards_test.go +++ b/cmd/exchange_wrapper_standards/exchange_wrapper_standards_test.go @@ -606,7 +606,7 @@ var blockedCIExchanges = []string{ // blockedExchanges are exchanges that are not able to be tested in general var blockedExchanges = []string{ - "coinbasepro", // coinbasepro API requires authentication for almost every endpoint + // "coinbasepro", // coinbasepro API requires authentication for almost every endpoint } // unsupportedAssets contains assets that cannot handle @@ -717,6 +717,18 @@ func isFiat(t *testing.T, c string) bool { return false } +// func getTestableAssets(t *testing.T, exch exchange.IBotExchange) []asset.Item { +// t.Helper() +// var assets []asset.Item +// if exchange == coinbrasepro && asset.Ifutures { +// continue +// } +// for x := range exch.GetBase().CurrencyPairs.GetAssetTypes(false) { +// assets = append(assets, exch.GetBase().CurrencyPairs.GetAssetTypes(false)[x]) +// } +// return assets +// } + // disruptFormatting adds in an unused delimiter and strange casing features to // ensure format currency pair is used throughout the code base. func disruptFormatting(t *testing.T, p currency.Pair) (currency.Pair, error) { diff --git a/exchanges/coinbasepro/coinbasepro_test.go b/exchanges/coinbasepro/coinbasepro_test.go index 52a1e349592..979429209cb 100644 --- a/exchanges/coinbasepro/coinbasepro_test.go +++ b/exchanges/coinbasepro/coinbasepro_test.go @@ -98,7 +98,6 @@ func TestMain(m *testing.M) { if err != nil { log.Fatal(err) } - // c.Verbose = true os.Exit(m.Run()) } @@ -1060,11 +1059,11 @@ func TestFetchTradablePairs(t *testing.T) { func TestUpdateTradablePairs(t *testing.T) { t.Parallel() err := c.UpdateTradablePairs(context.Background(), false) - if sharedtestvalues.AreAPICredentialsSet(c) { - assert.NoError(t, err) - } else { - assert.ErrorIs(t, err, errAuthenticationNeeded) - } + // if sharedtestvalues.AreAPICredentialsSet(c) { + assert.NoError(t, err) + // } else { + // assert.ErrorIs(t, err, errAuthenticationNeeded) + // } } func TestUpdateAccountInfo(t *testing.T) { diff --git a/exchanges/coinbasepro/coinbasepro_wrapper.go b/exchanges/coinbasepro/coinbasepro_wrapper.go index 6a0283ddfb8..d501c127610 100644 --- a/exchanges/coinbasepro/coinbasepro_wrapper.go +++ b/exchanges/coinbasepro/coinbasepro_wrapper.go @@ -228,6 +228,10 @@ func (c *CoinbasePro) UpdateTradablePairs(ctx context.Context, forceUpdate bool) for i := range assets { pairs, err := c.FetchTradablePairs(ctx, assets[i]) if err != nil { + if errors.Is(err, errAuthenticationNeeded) && assets[i] == asset.Futures { + log.Warnf(log.ExchangeSys, "%v", err) + continue + } return err } err = c.UpdatePairs(pairs, assets[i], false, forceUpdate) diff --git a/exchanges/exchange.go b/exchanges/exchange.go index d18a262b2ae..fcd9aa45e3c 100644 --- a/exchanges/exchange.go +++ b/exchanges/exchange.go @@ -1971,8 +1971,7 @@ func GetDefaultConfig(ctx context.Context, exch IBotExchange) (*config.Exchange, } if b.Features.Supports.RESTCapabilities.AutoPairUpdates { - err = exch.UpdateTradablePairs(ctx, true) - if err != nil { + if err = exch.UpdateTradablePairs(ctx, true); err != nil { return nil, err } }