Skip to content

Commit

Permalink
fixup! GateIO: Split asset.Futures into CoinM and USDT
Browse files Browse the repository at this point in the history
  • Loading branch information
gbjk committed Jan 25, 2025
1 parent 8aafe16 commit ae27ab1
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions exchanges/gateio/gateio_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1754,8 +1754,15 @@ func TestGetSingleSubAccount(t *testing.T) {
func TestFetchTradablePairs(t *testing.T) {
t.Parallel()
for _, a := range g.GetAssetTypes(false) {
_, err := g.FetchTradablePairs(context.Background(), a)
assert.NoErrorf(t, err, "FetchTradablePairs should not error for %s", a)
pairs, err := g.FetchTradablePairs(context.Background(), a)
require.NoErrorf(t, err, "FetchTradablePairs must not error for %s", a)
require.NotEmptyf(t, pairs, "FetchTradablePairs must return some pairs for %s", a)
if a == asset.USDTMarginedFutures || a == asset.CoinMarginedFutures {
for _, p := range pairs {
_, err := getSettlementCurrency(a, p)
require.NoErrorf(t, err, "Fetched pair %s %s must not error on getSettlementCurrency", a, p)
}
}
}
}

Expand Down Expand Up @@ -2823,6 +2830,8 @@ func TestGetCurrencyTradeURL(t *testing.T) {
pairs, err := g.CurrencyPairs.GetPairs(a, false)
require.NoError(t, err, "cannot get pairs for %s", a)
require.NotEmpty(t, pairs, "no pairs for %s", a)
t.Log(a)
t.Log(pairs)
resp, err := g.GetCurrencyTradeURL(context.Background(), a, pairs[0])
if a == asset.Options {
require.ErrorIs(t, err, asset.ErrNotSupported)
Expand Down

0 comments on commit ae27ab1

Please sign in to comment.