Skip to content

Open-source personal finance manager. Self-hosted, privacy-first.

feat(currency): add UAE Dirham (AED) support (#945)

Asanka Hendahewa9149ceb1673e
diff --git a/backend/app/api/currencies.py b/backend/app/api/currencies.py
index c3f596b4..da375834 100644
--- a/backend/app/api/currencies.py
+++ b/backend/app/api/currencies.py
@@ -42,6 +42,7 @@ CURRENCY_META = {
"TRY": {"symbol": "₺", "name": "Turkish Lira", "flag": "\U0001F1F9\U0001F1F7"},
"PKR": {"symbol": "₨", "name": "Pakistani Rupee", "flag": "\U0001F1F5\U0001F1F0"},
"MDL": {"symbol": "L", "name": "Moldovan Leu", "flag": "\U0001F1F2\U0001F1E9"},
+ "AED": {"symbol": "د.إ", "name": "UAE Dirham", "flag": "\U0001F1E6\U0001F1EA"},
}
diff --git a/backend/app/core/config.py b/backend/app/core/config.py
index 20b4a308..8d51ff9e 100644
--- a/backend/app/core/config.py
+++ b/backend/app/core/config.py
@@ -66,7 +66,7 @@ class Settings(BaseSettings):
# FX Rates
openexchangerates_app_id: str = ""
- supported_currencies: str = "USD,EUR,GBP,BRL,CAD,AUD,CHF,ARS,JPY,MXN,INR,SEK,DKK,NOK,PLN,CZK,HUF,RON,CRC,IDR,COP,CLP,DOP,RUB,GTQ,PHP,UAH,NZD,VND,SGD,AZN,TRY,PKR,MDL" # comma-separated list
+ supported_currencies: str = "USD,EUR,GBP,BRL,CAD,AUD,CHF,ARS,JPY,MXN,INR,SEK,DKK,NOK,PLN,CZK,HUF,RON,CRC,IDR,COP,CLP,DOP,RUB,GTQ,PHP,UAH,NZD,VND,SGD,AZN,TRY,PKR,MDL,AED" # comma-separated list
fx_sync_mode: str = "on_demand" # "on_demand" or "scheduled"
# Storage
diff --git a/backend/tests/test_currencies_api.py b/backend/tests/test_currencies_api.py
index 2b84b467..7f3f78da 100644
--- a/backend/tests/test_currencies_api.py
+++ b/backend/tests/test_currencies_api.py
@@ -143,3 +143,12 @@ async def test_currencies_include_mdl_with_metadata(client: AsyncClient):
assert mdl["symbol"] == "L"
assert mdl["name"] == "Moldovan Leu"
assert mdl["flag"] == "🇲🇩"
+async def test_currencies_include_aed_with_metadata(client: AsyncClient):
+ response = await client.get("/api/currencies")
+ data = response.json()
+ aed = next((currency for currency in data if currency["code"] == "AED"), None)
+
+ assert aed is not None
+ assert aed["symbol"] == "د.إ"
+ assert aed["name"] == "UAE Dirham"
+ assert aed["flag"] == "🇦🇪"
diff --git a/frontend/src/components/currency-select.tsx b/frontend/src/components/currency-select.tsx
index 8e0b20ec..b44aeaef 100644
--- a/frontend/src/components/currency-select.tsx
+++ b/frontend/src/components/currency-select.tsx
@@ -44,6 +44,7 @@ export const CURRENCIES = [
{ code: 'TRY', flag: '\u{1F1F9}\u{1F1F7}', symbol: '₺' },
{ code: 'PKR', flag: '\u{1F1F5}\u{1F1F0}', symbol: '₨' },
{ code: 'MDL', flag: '\u{1F1F2}\u{1F1E9}', symbol: 'L' },
+ { code: 'AED', flag: '\u{1F1E6}\u{1F1EA}', symbol: 'د.إ' },
] as const
interface CurrencySelectProps {
diff --git a/frontend/src/lib/format.ts b/frontend/src/lib/format.ts
index ed2e770d..390d1cb8 100644
--- a/frontend/src/lib/format.ts
+++ b/frontend/src/lib/format.ts
@@ -67,6 +67,7 @@ const CURRENCY_LOCALE: Record<string, string> = {
TRY: 'tr-TR',
PKR: 'en-PK',
MDL: 'ro-MD',
+ AED: 'ar-AE',
}
/**