Open-source personal finance manager. Self-hosted, privacy-first.
feat(currency): add Moldovan Leu (MDL) support (#885)
Max004675e53a72
diff --git a/backend/app/api/currencies.py b/backend/app/api/currencies.pyindex a8302444..c3f596b4 100644--- a/backend/app/api/currencies.py+++ b/backend/app/api/currencies.py@@ -41,6 +41,7 @@ CURRENCY_META = {"SGD": {"symbol": "S$", "name": "Singapore Dollar", "flag": "\U0001F1F8\U0001F1EC"},"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"},}diff --git a/backend/app/core/config.py b/backend/app/core/config.pyindex 6986e375..20b4a308 100644--- a/backend/app/core/config.py+++ b/backend/app/core/config.py@@ -66,7 +66,7 @@ class Settings(BaseSettings):# FX Ratesopenexchangerates_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" # 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" # comma-separated listfx_sync_mode: str = "on_demand" # "on_demand" or "scheduled"# Storagediff --git a/backend/tests/test_currencies_api.py b/backend/tests/test_currencies_api.pyindex 5184b89b..2b84b467 100644--- a/backend/tests/test_currencies_api.py+++ b/backend/tests/test_currencies_api.py@@ -131,3 +131,15 @@ async def test_currencies_include_pkr_with_metadata(client: AsyncClient):assert pkr["symbol"] == "₨"assert pkr["name"] == "Pakistani Rupee"assert pkr["flag"] == "🇵🇰"+++async def test_currencies_include_mdl_with_metadata(client: AsyncClient):+ response = await client.get("/api/currencies")+ data = response.json()+ mdl = next((currency for currency in data if currency["code"] == "MDL"), None)++ assert mdl is not None+ assert mdl["symbol"] == "L"+ assert mdl["name"] == "Moldovan Leu"+ assert mdl["flag"] == "🇲🇩"diff --git a/frontend/src/components/currency-select.tsx b/frontend/src/components/currency-select.tsxindex 1099a9b8..8e0b20ec 100644--- a/frontend/src/components/currency-select.tsx+++ b/frontend/src/components/currency-select.tsx@@ -43,6 +43,7 @@ export const CURRENCIES = [{ code: 'SGD', flag: '\u{1F1F8}\u{1F1EC}', symbol: 'S$' },{ 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' },] as constinterface CurrencySelectProps {diff --git a/frontend/src/lib/format.ts b/frontend/src/lib/format.tsindex 65cfc96b..ed2e770d 100644--- a/frontend/src/lib/format.ts+++ b/frontend/src/lib/format.ts@@ -66,6 +66,7 @@ const CURRENCY_LOCALE: Record<string, string> = {AZN: 'az-AZ',TRY: 'tr-TR',PKR: 'en-PK',+ MDL: 'ro-MD',}/**