Tests: Use currency.NewBTCUSD and NewBTCUSDT (#1895)

* Tests: Use currency.NewUSD and NewUSDT

Simple refactor to use the provided shortcut methods

* Github: Add CI check to ensure NewPair not used

Add a step to ensure NewPair(BTC, USD*) isn't used
This commit is contained in:
Gareth Kirwan
2025-05-07 03:32:06 +02:00
committed by GitHub
parent eda6015d73
commit 3caa149d8e
83 changed files with 555 additions and 542 deletions

View File

@@ -21,7 +21,7 @@ func TestLoadCandles(t *testing.T) {
exch, err := em.NewExchangeByName(testExchange)
require.NoError(t, err, "NewExchangeByName must not error")
exch.SetDefaults()
cp := currency.NewPair(currency.BTC, currency.USDT)
cp := currency.NewBTCUSDT()
b := exch.GetBase()
b.CurrencyPairs.Pairs = make(map[asset.Item]*currency.PairStore)
b.CurrencyPairs.Pairs[asset.Spot] = &currency.PairStore{
@@ -48,7 +48,7 @@ func TestLoadTrades(t *testing.T) {
exch, err := em.NewExchangeByName(testExchange)
require.NoError(t, err, "NewExchangeByName must not error")
exch.SetDefaults()
cp := currency.NewPair(currency.BTC, currency.USDT)
cp := currency.NewBTCUSDT()
b := exch.GetBase()
b.CurrencyPairs.Pairs = make(map[asset.Item]*currency.PairStore)
b.CurrencyPairs.Pairs[asset.Spot] = &currency.PairStore{