Improve currency pair handling code

Fixes these happy little accidents:
1) Config: Actually use enabled pairs for config.GetEnabledPairs
2) Pair format: Handle edge case for pairs DASHKRW vs DSHKRW and improve testing
This commit is contained in:
Adrian Gallagher
2019-04-15 14:49:46 +10:00
parent 32b43387fd
commit 5a42a4162b
4 changed files with 27 additions and 12 deletions

View File

@@ -401,6 +401,7 @@ func TestGetEnabledCurrencies(t *testing.T) {
format := config.CurrencyPairFormatConfig{
Delimiter: "-",
Index: "",
Uppercase: true,
}
b.RequestCurrencyPairFormat = format
@@ -466,6 +467,7 @@ func TestGetAvailableCurrencies(t *testing.T) {
format := config.CurrencyPairFormatConfig{
Delimiter: "-",
Index: "",
Uppercase: true,
}
b.RequestCurrencyPairFormat = format