Open-source personal finance manager. Self-hosted, privacy-first.
feat(currency): add Egyptian pound (EGP) support (#923)
archibullofd2282681a43
diff --git a/backend/app/api/currencies.py b/backend/app/api/currencies.pyindex 89cb619f..862b7fa8 100644--- a/backend/app/api/currencies.py+++ b/backend/app/api/currencies.py@@ -44,6 +44,7 @@ CURRENCY_META = {"MDL": {"symbol": "L", "name": "Moldovan Leu", "flag": "\U0001F1F2\U0001F1E9"},"AED": {"symbol": "د.إ", "name": "UAE Dirham", "flag": "\U0001F1E6\U0001F1EA"},"THB": {"symbol": "\u0e3f", "name": "Thai Baht", "flag": "\U0001F1F9\U0001F1ED"},+ "EGP": {"symbol": "E£", "name": "Egyptian Pound", "flag": "\U0001F1EA\U0001F1EC"},}diff --git a/backend/app/core/config.py b/backend/app/core/config.pyindex e71c8ea9..cf88db23 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,MDL,AED,THB" # 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,THB,EGP" # 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 04410ede..88fd00bc 100644--- a/backend/tests/test_currencies_api.py+++ b/backend/tests/test_currencies_api.py@@ -164,3 +164,12 @@ async def test_currencies_include_thb_with_metadata(client: AsyncClient):assert thb["symbol"] == "฿"assert thb["name"] == "Thai Baht"assert thb["flag"] == "🇹🇭"+async def test_currencies_include_egp_with_metadata(client: AsyncClient):+ response = await client.get("/api/currencies")+ data = response.json()+ egp = next((currency for currency in data if currency["code"] == "EGP"), None)++ assert egp is not None+ assert egp["symbol"] == "E£"+ assert egp["name"] == "Egyptian Pound"+ assert egp["flag"] == "🇪🇬"diff --git a/frontend/src/components/currency-select.tsx b/frontend/src/components/currency-select.tsxindex e040e6b6..839560f5 100644--- a/frontend/src/components/currency-select.tsx+++ b/frontend/src/components/currency-select.tsx@@ -46,6 +46,7 @@ export const CURRENCIES = [{ code: 'MDL', flag: '\u{1F1F2}\u{1F1E9}', symbol: 'L' },{ code: 'AED', flag: '\u{1F1E6}\u{1F1EA}', symbol: 'د.إ' },{ code: 'THB', flag: '\u{1F1F9}\u{1F1ED}', symbol: '฿' },+ { code: 'EGP', flag: '\u{1F1EA}\u{1F1EC}', symbol: 'E£' },] as constinterface CurrencySelectProps {diff --git a/frontend/src/lib/format.ts b/frontend/src/lib/format.tsindex bc0777f1..6c26ce45 100644--- a/frontend/src/lib/format.ts+++ b/frontend/src/lib/format.ts@@ -69,6 +69,7 @@ const CURRENCY_LOCALE: Record<string, string> = {MDL: 'ro-MD',AED: 'ar-AE',THB: 'th-TH',+ EGP: 'en-EG',}/**