Skip to content
This repository was archived by the owner on Jun 12, 2024. It is now read-only.

Commit 5438898

Browse files
authored
feat: add currencies XAG and XAU (#535)
* Added currencies XAG and XAU to currency.ts I added XAG and XAU for myself and others who prefer to measure value with something of substance. Review the ISO 4217 standard to view a full list of official currency codes including the ones I have added. https://www.iso.org/iso-4217-currency-codes.html https://en.wikipedia.org/wiki/ISO_4217 Example: https://www.xe.com/currencyconverter/convert/?Amount=100&From=XAG&To=USD API for exchange rates: https://openexchangerates.org/ * Added field values xag and xau to group.go * Update group.go
1 parent 9fa17be commit 5438898

File tree

3 files changed

+9
-1
lines changed

3 files changed

+9
-1
lines changed

Diff for: backend/internal/data/ent/group/group.go

+3-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Diff for: backend/internal/data/ent/schema/group.go

+2
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,8 @@ func (Group) Fields() []ent.Field {
5858
"thb",
5959
"try",
6060
"usd",
61+
"xag",
62+
"xau",
6163
"zar",
6264
),
6365
}

Diff for: frontend/lib/data/currency.ts

+4
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@ export type Codes =
2727
| "THB"
2828
| "TRY"
2929
| "USD"
30+
| "XAG"
31+
| "XAU"
3032
| "ZAR";
3133

3234
export type Currency = {
@@ -65,5 +67,7 @@ export const currencies: Currency[] = [
6567
{ code: "THB", local: "Thailand", symbol: "฿", name: "Thai Baht" },
6668
{ code: "TRY", local: "Turkey", symbol: "₺", name: "Turkish Lira" },
6769
{ code: "USD", local: "United States", symbol: "$", name: "United States Dollar" },
70+
{ code: "XAG", local: "Global", symbol: "XAG", name: "Silver Troy Ounce" },
71+
{ code: "XAU", local: "Global", symbol: "XAU", name: "Gold Troy Ounce" },
6872
{ code: "ZAR", local: "South Africa", symbol: "R", name: "South African Rand" },
6973
];

0 commit comments

Comments
 (0)