forked from mirrors/homebox
feat: user defined currencies (#700)
* basic currency service for loading at runtime * api endpoint for currencies * sort slice before return * remove currency validation * validate using currency service * implement selecting dynamic currency options * bump go version * fix type definition * specify explicit type * change go versions * proper types for assetId * log/return currency error * make case insensative * use ToUpper instead * feat: adding new currencies (#715) * fix: task swag (#710) Co-authored-by: Quoing <pavel.cadersky@mavenir.com> * [feat] Adding new currencies --------- Co-authored-by: quoing <quoing@users.noreply.github.com> Co-authored-by: Quoing <pavel.cadersky@mavenir.com> Co-authored-by: Bradley <41597815+userbradley@users.noreply.github.com> * remove ts file and consoldate new values into json * move flag to options namespace * add env config for currencies * basic documentaion * remove in sync test --------- Co-authored-by: quoing <quoing@users.noreply.github.com> Co-authored-by: Quoing <pavel.cadersky@mavenir.com> Co-authored-by: Bradley <41597815+userbradley@users.noreply.github.com> Former-commit-id: c4b923847a1b695dcddd1b346adcccfd3f3ce706
This commit is contained in:
parent
ce923a5b4c
commit
2b79788fbe
39 changed files with 1226 additions and 328 deletions
|
@ -1,73 +0,0 @@
|
|||
export type Codes =
|
||||
| "AED"
|
||||
| "AUD"
|
||||
| "BGN"
|
||||
| "BRL"
|
||||
| "CAD"
|
||||
| "CHF"
|
||||
| "CZK"
|
||||
| "DKK"
|
||||
| "EUR"
|
||||
| "GBP"
|
||||
| "HKD"
|
||||
| "IDR"
|
||||
| "INR"
|
||||
| "JPY"
|
||||
| "KRW"
|
||||
| "MXN"
|
||||
| "NOK"
|
||||
| "NZD"
|
||||
| "PLN"
|
||||
| "RMB"
|
||||
| "RUB"
|
||||
| "RON"
|
||||
| "SAR"
|
||||
| "SEK"
|
||||
| "SGD"
|
||||
| "THB"
|
||||
| "TRY"
|
||||
| "USD"
|
||||
| "XAG"
|
||||
| "XAU"
|
||||
| "ZAR";
|
||||
|
||||
export type Currency = {
|
||||
code: Codes;
|
||||
local: string;
|
||||
symbol: string;
|
||||
name: string;
|
||||
};
|
||||
|
||||
export const currencies: Currency[] = [
|
||||
{ code: "AED", local: "United Arab Emirates", symbol: "د.إ", name: "United Arab Emirates Dirham" },
|
||||
{ code: "AUD", local: "Australia", symbol: "A$", name: "Australian Dollar" },
|
||||
{ code: "BGN", local: "bg-BG", symbol: "lv", name: "Bulgarian lev" },
|
||||
{ code: "BRL", local: "Brazil", symbol: "R$", name: "Brazilian Real" },
|
||||
{ code: "CAD", local: "Canada", symbol: "C$", name: "Canadian Dollar" },
|
||||
{ code: "CHF", local: "Switzerland", symbol: "CHF", name: "Swiss Franc" },
|
||||
{ code: "CZK", local: "cs-CZ", symbol: "Kč", name: "Czech Koruna" },
|
||||
{ code: "DKK", local: "da-DK", symbol: "kr", name: "Danish Krone" },
|
||||
{ code: "EUR", local: "Eurozone", symbol: "€", name: "Euro" },
|
||||
{ code: "GBP", local: "United Kingdom", symbol: "£", name: "British Pound Sterling" },
|
||||
{ code: "HKD", local: "Hong Kong", symbol: "HK$", name: "Hong Kong Dollar" },
|
||||
{ code: "IDR", local: "Indonesia", symbol: "Rp", name: "Indonesian Rupiah" },
|
||||
{ code: "INR", local: "India", symbol: "₹", name: "Indian Rupee" },
|
||||
{ code: "JPY", local: "Japan", symbol: "¥", name: "Japanese Yen" },
|
||||
{ code: "KRW", local: "South Korea", symbol: "₩", name: "South Korean Won" },
|
||||
{ code: "MXN", local: "Mexico", symbol: "Mex$", name: "Mexican Peso" },
|
||||
{ code: "NOK", local: "Norway", symbol: "kr", name: "Norwegian Krone" },
|
||||
{ code: "NZD", local: "New Zealand", symbol: "NZ$", name: "New Zealand Dollar" },
|
||||
{ code: "PLN", local: "Poland", symbol: "zł", name: "Polish Zloty" },
|
||||
{ code: "RMB", local: "zh-CN", symbol: "¥", name: "Chinese Yuan" },
|
||||
{ code: "RON", local: "ro-RO", symbol: "lei", name: "Romanian Leu" },
|
||||
{ code: "RUB", local: "Russia", symbol: "₽", name: "Russian Ruble" },
|
||||
{ code: "SAR", local: "Saudi Arabia", symbol: "﷼", name: "Saudi Riyal" },
|
||||
{ code: "SEK", local: "Sweden", symbol: "kr", name: "Swedish Krona" },
|
||||
{ code: "SGD", local: "Singapore", symbol: "S$", name: "Singapore Dollar" },
|
||||
{ code: "THB", local: "Thailand", symbol: "฿", name: "Thai Baht" },
|
||||
{ code: "TRY", local: "Turkey", symbol: "₺", name: "Turkish Lira" },
|
||||
{ code: "USD", local: "United States", symbol: "$", name: "United States Dollar" },
|
||||
{ code: "XAG", local: "Global", symbol: "XAG", name: "Silver Troy Ounce" },
|
||||
{ code: "XAU", local: "Global", symbol: "XAU", name: "Gold Troy Ounce" },
|
||||
{ code: "ZAR", local: "South Africa", symbol: "R", name: "South African Rand" },
|
||||
];
|
Loading…
Add table
Add a link
Reference in a new issue