Skip to content

Commit

Permalink
fixup! RPCServer: Fix tests expecting StoreAssetPairFormat to enable …
Browse files Browse the repository at this point in the history
…the asset
  • Loading branch information
gbjk committed Dec 27, 2024
1 parent 36e3dff commit d6c8966
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions engine/rpcserver_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1547,19 +1547,19 @@ func TestCheckVars(t *testing.T) {
b := e.GetBase()

for _, a := range []asset.Item{asset.Spot, asset.Margin, asset.CoinMarginedFutures, asset.USDTMarginedFutures} {
fmt := currency.PairStore{
ps := currency.PairStore{
AssetEnabled: true,
RequestFormat: &currency.PairFormat{Uppercase: true},
ConfigFormat: &currency.PairFormat{Delimiter: currency.DashDelimiter, Uppercase: true},
}
switch a {
case asset.CoinMarginedFutures:
fmt.RequestFormat = &currency.PairFormat{Uppercase: true, Delimiter: currency.UnderscoreDelimiter}
fmt.ConfigFormat = &currency.PairFormat{Uppercase: true, Delimiter: currency.UnderscoreDelimiter}
ps.RequestFormat = &currency.PairFormat{Uppercase: true, Delimiter: currency.UnderscoreDelimiter}
ps.ConfigFormat = &currency.PairFormat{Uppercase: true, Delimiter: currency.UnderscoreDelimiter}
case asset.USDTMarginedFutures:
fmt.ConfigFormat = &currency.PairFormat{Uppercase: true, Delimiter: currency.DashDelimiter}
ps.ConfigFormat = &currency.PairFormat{Uppercase: true, Delimiter: currency.DashDelimiter}
}
require.NoError(t, b.StoreAssetPairStore(a, fmt), "StoreAssetPairStore must not error")
require.NoError(t, b.StoreAssetPairStore(a, ps), "StoreAssetPairStore must not error")
}

err = checkParams("Binance", e, asset.Spot, currency.NewPair(currency.BTC, currency.USDT))
Expand Down

0 comments on commit d6c8966

Please sign in to comment.