Open-source personal finance manager. Self-hosted, privacy-first.
feat(currency): add dominican peso support (#250)
Danny Feliz6f2932b57cfd
diff --git a/backend/app/api/currencies.py b/backend/app/api/currencies.pyindex 23c9f570..047257a3 100644--- a/backend/app/api/currencies.py+++ b/backend/app/api/currencies.py@@ -30,6 +30,7 @@ CURRENCY_META = {"RON": {"symbol": "lei", "name": "Romanian Leu", "flag": "\U0001F1F7\U0001F1F4"},"CRC": {"symbol": "₡", "name": "Costa Rican Colón", "flag": "\U0001F1E8\U0001F1F7"},"IDR": {"symbol": "Rp", "name": "Indonesian Rupiah", "flag": "\U0001F1EE\U0001F1E9"},+ "DOP": {"symbol": "RD$", "name": "Peso Dominicano", "flag": "\U0001F1E9\U0001F1F4"},}diff --git a/backend/app/core/config.py b/backend/app/core/config.pyindex 94475b8c..baa82654 100644--- a/backend/app/core/config.py+++ b/backend/app/core/config.py@@ -41,7 +41,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" # 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" # 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 ee7043fb..f727db79 100644--- a/backend/tests/test_currencies_api.py+++ b/backend/tests/test_currencies_api.py@@ -34,3 +34,15 @@ async def test_currencies_include_clp_with_metadata(client: AsyncClient):assert clp["symbol"] == "$"assert clp["name"] == "Peso Chileno"assert clp["flag"] == "🇨🇱"+++async def test_currencies_include_dop_with_metadata(client: AsyncClient):+ response = await client.get("/api/currencies")+ data = response.json()+ dop = next((currency for currency in data if currency["code"] == "DOP"), None)++ assert dop is not None+ assert dop["symbol"] == "RD$"+ assert dop["name"] == "Peso Dominicano"+ assert dop["flag"] == "🇩🇴"diff --git a/frontend/src/pages/register.tsx b/frontend/src/pages/register.tsxindex b4c28eca..6bff2676 100644--- a/frontend/src/pages/register.tsx+++ b/frontend/src/pages/register.tsx@@ -31,6 +31,7 @@ const currencies = [{ code: 'IDR', flag: '\u{1F1EE}\u{1F1E9}', symbol: 'Rp' },{ code: 'COP', flag: '\u{1F1E8}\u{1F1F4}', symbol: '$' },{ code: 'CLP', flag: '\u{1F1E8}\u{1F1F1}', symbol: '$' },+ { code: 'DOP', flag: '\u{1F1E9}\u{1F1F4}', symbol: 'RD$' },] as constexport default function RegisterPage() {diff --git a/frontend/src/pages/setup.tsx b/frontend/src/pages/setup.tsxindex 6a7b1b8f..a17f359d 100644--- a/frontend/src/pages/setup.tsx+++ b/frontend/src/pages/setup.tsx@@ -160,6 +160,7 @@ export default function SetupPage() {{ code: 'IDR', flag: '\u{1F1EE}\u{1F1E9}', symbol: 'Rp' },{ code: 'COP', flag: '\u{1F1E8}\u{1F1F4}', symbol: '$' },{ code: 'CLP', flag: '\u{1F1E8}\u{1F1F1}', symbol: '$' },+ { code: 'DOP', flag: '\u{1F1E9}\u{1F1F4}', symbol: 'RD$' },] as const).map(({ code, flag, symbol }) => (<buttonkey={code}