Alphabetize currency list

pull/53/head
Miguel Mota 4 years ago
parent cf13ad6755
commit eb3831e385

@ -819,7 +819,7 @@ Frequently asked questions:
- Q: Which currencies can I convert to?
- A: The supported fiat currencies for conversion are `AUD`, `BRL`, `CAD`, `CFH`, `CLP`, `CNY`, `CZK`, `DKK`, `EUR`, `GBP`, `HKD`, `HUF`, `IDR`, `ILS`, `INR`, `JPY`, `KRW`, `MXN`, `MYR`, `NOK`, `NZD`, `PLN`, `PHP`, `PKR`, `RUB`, `SEK`, `SGD`, `THB`, `TRY`, `TWD`, `USD`, `ZAR` and `VND`.
- A: The supported fiat currencies for conversion are `AUD`, `BRL`, `CAD`, `CFH`, `CLP`, `CNY`, `CZK`, `DKK`, `EUR`, `GBP`, `HKD`, `HUF`, `IDR`, `ILS`, `INR`, `JPY`, `KRW`, `MXN`, `MYR`, `NOK`, `NZD`, `PLN`, `PHP`, `PKR`, `RUB`, `SEK`, `SGD`, `THB`, `TRY`, `TWD`, `USD`, `VND`, and `ZAR`.
The supported crypto currencies for conversion are `BTC` and `ETH`.

@ -252,25 +252,26 @@ func (s *Service) CoinLink(name string) string {
// SupportedCurrencies returns a list of supported currencies
func (s *Service) SupportedCurrencies() []string {
// keep these in alphabetical order
return []string{
"BTC",
"ETH",
"BNB",
"EOS",
"USD",
"AED",
"ARS",
"AUD",
"BDT",
"BHD",
"BMD",
"BNB",
"BRL",
"BTC",
"CAD",
"CHF",
"CLP",
"CNY",
"CZK",
"DKK",
"EOS",
"ETH",
"EUR",
"GBP",
"HKD",
@ -297,11 +298,11 @@ func (s *Service) SupportedCurrencies() []string {
"THB",
"TRY",
"TWD",
"USD",
"VEF",
"VND",
"ZAR",
"XDR",
"XAG",
"VND",
"XDR",
"ZAR",
}
}

@ -192,17 +192,19 @@ func (s *Service) CoinLink(name string) string {
// SupportedCurrencies returns a list of supported currencies
func (s *Service) SupportedCurrencies() []string {
// keep these in alphabetical order
return []string{
"BTC",
"ETH",
"AUD",
"BRL",
"BTC",
"CAD",
"CFH",
"CLP",
"CNY",
"CZK",
"DKK",
"ETH",
"EUR",
"GBP",
"HKD",
@ -216,9 +218,9 @@ func (s *Service) SupportedCurrencies() []string {
"MYR",
"NOK",
"NZD",
"PLN",
"PHP",
"PKR",
"PLN",
"RUB",
"SEK",
"SGD",
@ -226,7 +228,7 @@ func (s *Service) SupportedCurrencies() []string {
"TRY",
"TWD",
"USD",
"ZAR",
"VND",
"ZAR",
}
}

@ -9,6 +9,7 @@ import (
"github.com/miguelmota/cointop/cointop/common/pad"
)
// keep these in alphabetical order
var fiatCurrencyNames = map[string]string{
"AUD": "Australian Dollar",
"BRL": "Brazilian Real",
@ -41,8 +42,8 @@ var fiatCurrencyNames = map[string]string{
"TRY": "Turkish lira",
"TWD": "New Taiwan Dollar",
"USD": "US Dollar",
"VND": "Vietnamese Dong",
"ZAR": "South African Rand",
"VND": "Vietnamese đồng",
}
var cryptocurrencyNames = map[string]string{
@ -50,6 +51,7 @@ var cryptocurrencyNames = map[string]string{
"ETH": "Ethereum",
}
// keep these in alphabetical order
var currencySymbolMap = map[string]string{
"AUD": "$",
"BRL": "R$",
@ -84,8 +86,8 @@ var currencySymbolMap = map[string]string{
"TRY": "₺",
"TWD": "NT$",
"USD": "$",
"ZAR": "R",
"VND": "₫",
"ZAR": "R",
}
var alphanumericcharacters = []rune{'0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z'}

Loading…
Cancel
Save