From 29d14bb5ef8ac8024ac378eda814588d2b7fb02e Mon Sep 17 00:00:00 2001 From: MaysWind Date: Sun, 13 Jul 2025 02:04:27 +0800 Subject: [PATCH] update latest supported currencies of Bank of Russia / International Monetary Fund exchange data source --- pkg/exchangerates/http_exchange_rates_datasource_test.go | 9 +++++---- .../international_monetary_fund_datasource.go | 2 -- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/pkg/exchangerates/http_exchange_rates_datasource_test.go b/pkg/exchangerates/http_exchange_rates_datasource_test.go index a3f41468..0a0e927e 100644 --- a/pkg/exchangerates/http_exchange_rates_datasource_test.go +++ b/pkg/exchangerates/http_exchange_rates_datasource_test.go @@ -234,9 +234,10 @@ func TestExchangeRatesApiLatestExchangeRateHandler_BankOfRussiaDataSource(t *tes assert.Equal(t, "RUB", exchangeRateResponse.BaseCurrency) - supportedCurrencyCodes := []string{"AED", "AMD", "AUD", "AZN", "BGN", "BRL", "BYN", "CAD", "CHF", "CNY", "CZK", - "DKK", "EGP", "EUR", "GBP", "GEL", "HKD", "HUF", "IDR", "INR", "JPY", "KGS", "KRW", "KZT", "MDL", - "NOK", "NZD", "PLN", "QAR", "RON", "RSD", "SEK", "SGD", "THB", "TJS", "TMT", "TRY", + supportedCurrencyCodes := []string{"AED", "AMD", "AUD", "AZN", "BDT", "BGN", "BHD", "BOB", "BRL", "BYN", + "CAD", "CHF", "CNY", "CUP", "CZK", "DKK", "DZD", "EGP", "ETB", "EUR", "GBP", "GEL", "HKD", "HUF", + "IDR", "INR", "IRR", "JPY", "KGS", "KRW", "KZT", "MDL", "MMK", "MNT", "NGN", "NOK", "NZD", + "OMR", "PLN", "QAR", "RON", "RSD", "SAR", "SEK", "SGD", "THB", "TJS", "TMT", "TRY", "UAH", "USD", "UZS", "VND", "ZAR"} checkExchangeRatesHaveSpecifiedCurrencies(t, exchangeRateResponse.BaseCurrency, supportedCurrencyCodes, exchangeRateResponse.ExchangeRates) @@ -305,7 +306,7 @@ func TestExchangeRatesApiLatestExchangeRateHandler_InternationalMonetaryFundData supportedCurrencyCodes := []string{"AED", "AUD", "BND", "BRL", "BWP", "CAD", "CHF", "CLP", "CNY", "CZK", "DKK", "DZD", "EUR", "GBP", "ILS", "INR", "JPY", "KRW", "KWD", "MUR", "MXN", "MYR", "NOK", "NZD", - "OMR", "PEN", "PHP", "PLN", "QAR", "RUB", "SAR", "SEK", "SGD", "THB", "TTD", "UYU", "ZAR"} + "OMR", "PEN", "PHP", "PLN", "QAR", "SAR", "SEK", "SGD", "THB", "TTD", "UYU"} checkExchangeRatesHaveSpecifiedCurrencies(t, exchangeRateResponse.BaseCurrency, supportedCurrencyCodes, exchangeRateResponse.ExchangeRates) } diff --git a/pkg/exchangerates/international_monetary_fund_datasource.go b/pkg/exchangerates/international_monetary_fund_datasource.go index f3565e27..8fb03415 100644 --- a/pkg/exchangerates/international_monetary_fund_datasource.go +++ b/pkg/exchangerates/international_monetary_fund_datasource.go @@ -60,10 +60,8 @@ func init() { internationalMonetaryFundCurrencyNameCodeMap["Philippine peso"] = "PHP" internationalMonetaryFundCurrencyNameCodeMap["Polish zloty"] = "PLN" internationalMonetaryFundCurrencyNameCodeMap["Qatari riyal"] = "QAR" - internationalMonetaryFundCurrencyNameCodeMap["Russian ruble"] = "RUB" internationalMonetaryFundCurrencyNameCodeMap["Saudi Arabian riyal"] = "SAR" internationalMonetaryFundCurrencyNameCodeMap["Singapore dollar"] = "SGD" - internationalMonetaryFundCurrencyNameCodeMap["South African rand"] = "ZAR" internationalMonetaryFundCurrencyNameCodeMap["Swedish krona"] = "SEK" internationalMonetaryFundCurrencyNameCodeMap["Swiss franc"] = "CHF" internationalMonetaryFundCurrencyNameCodeMap["Thai baht"] = "THB"