feat: switch currency widget to Frankfurter v2 API#1
Open
melanki wants to merge 1 commit into
Open
Conversation
Replaces exchangerate-api.com with frankfurter.dev for the dashboard Currency widget. Frankfurter is open-source, sourced from central banks, and supports historical lookups by date — which we'll need for multi-currency budget conversion in a follow-up change. Changes: - CurrencyWidget: fetch /v2/rates?base="es= (same response shape for the field we read, data.rates[to]). - server CSP: swap api.exchangerate-api.com for api.frankfurter.dev in connect-src. - DashboardPage test: update MSW intercept to the new host and v2 response payload. - wiki: point readers at Frankfurter and note the upcoming historical use case. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
exchangerate-api.comwithfrankfurter.dev(v2) as the rate source for the dashboard CurrencyWidget.connect-srcallowlist accordingly, plus the MSW intercept inDashboardPage.test.tsxand the wiki entry inDashboard-Widgets.md.data.rates[to]field is read, so the widget behavior is unchanged. The new endpoint shape isGET /v2/rates?base={from}"es={to}returning{ base, date, rates: { [code]: number } }.Why
Frankfurter is open-source, aggregates data from central banks, and supports historical lookups by date. That historical capability is the reason for the swap — it will be used in a follow-up PR to convert prior-dated expenses for multi-currency budgets. This PR only does the API swap; no UI change.
Test plan
npx vitest run src/pages/DashboardPage.test.tsx— 32/32 pass with the updated MSW intercept.🤖 Generated with Claude Code