fix(explorer): use selected currency for exchange rate fallback - #1538
fix(explorer): use selected currency for exchange rate fallback#1538telestrial wants to merge 1 commit into
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
🦋 Changeset detectedLatest commit: 3531357 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
There was a problem hiding this comment.
Pull request overview
Adjusts Explorer SSR “fallback” exchange-rate data so the initial server-rendered value aligns with the user’s selected currency, avoiding temporarily showing a USD rate under a non-USD currency display until the client fetch resolves.
Changes:
- Use the provided
currencyargument (instead of hardcoded'usd') when fetching the fallback exchange rate. - Add a Changesets patch entry documenting the fix.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| apps/explorer/lib/fallback.ts | Updates SSR fallback exchange-rate request to use the selected currency (and related SWR fallback key). |
| .changeset/olive-poems-shake.md | Adds a patch changeset describing the SSR exchange-rate fix. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| export async function buildFallbackDataExchangeRate(currency: CurrencyID) { | ||
| const explored = await getExplored() | ||
| const { data: rate } = await explored.exchangeRate({ | ||
| params: { currency: 'usd' }, | ||
| params: { currency }, | ||
| }) |
| @@ -10,7 +10,7 @@ import { getExplored } from './explored' | |||
| export async function buildFallbackDataExchangeRate(currency: CurrencyID) { | |||
| const explored = await getExplored() | |||
| const { data: rate } = await explored.exchangeRate({ | |||
There was a problem hiding this comment.
Maybe add some e2e tests, one for the default case, and then one that passes a cookie and checks the the server rendered page (JS disabled) lines up - that way we know for sure.
alexfreska
left a comment
There was a problem hiding this comment.
If its currently showing the wrong value this fix definitely makes sense. Could use a test just to be sure.

I think this is just an oversight on the "fallback" language. A user preferring EUR would see the USD exchange rate number next to the pound icon until it resolved. I believe this cleans that up but would appreciate a good eye towards whether I'm categorizing the issue correctly.