Skip to content

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

feat: add CLP currency for Chile (#252)

R ツ84e8c2276d03
diff --git a/backend/app/core/config.py b/backend/app/core/config.py
index 46e416fc..94475b8c 100644
--- a/backend/app/core/config.py
+++ b/backend/app/core/config.py
@@ -41,7 +41,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" # 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" # 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 f08a6379..ee7043fb 100644
--- a/backend/tests/test_currencies_api.py
+++ b/backend/tests/test_currencies_api.py
@@ -22,3 +22,15 @@ async def test_currencies_include_brl_and_usd(client: AsyncClient):
codes = [c["code"] for c in response.json()]
assert "BRL" in codes
assert "USD" in codes
+
+
+async def test_currencies_include_clp_with_metadata(client: AsyncClient):
+ response = await client.get("/api/currencies")
+ data = response.json()
+ clp = next((currency for currency in data if currency["code"] == "CLP"), None)
+
+ assert clp is not None
+ assert clp["symbol"] == "$"
+ assert clp["name"] == "Peso Chileno"
+ assert clp["flag"] == "πŸ‡¨πŸ‡±"
diff --git a/frontend/src/pages/register.tsx b/frontend/src/pages/register.tsx
index dcbeef51..c8f195cf 100644
--- a/frontend/src/pages/register.tsx
+++ b/frontend/src/pages/register.tsx
@@ -29,6 +29,7 @@ const currencies = [
{ code: 'CRC', flag: '\u{1F1E8}\u{1F1F7}', symbol: 'β‚‘' },
{ 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: '$' },
] as const
export default function RegisterPage() {
diff --git a/frontend/src/pages/setup.tsx b/frontend/src/pages/setup.tsx
index 2d144c49..6db4df4a 100644
--- a/frontend/src/pages/setup.tsx
+++ b/frontend/src/pages/setup.tsx
@@ -158,6 +158,7 @@ export default function SetupPage() {
{ code: 'CRC', flag: '\u{1F1E8}\u{1F1F7}', symbol: 'β‚‘' },
{ 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: '$' },
] as const).map(({ code, flag, symbol }) => (
<button
key={code}