Skip to content

fix(explorer): use selected currency for exchange rate fallback - #1538

Closed
telestrial wants to merge 1 commit into
mainfrom
08-19-fix_explorer_use_selected_currency_for_exchange_rate_fallback
Closed

fix(explorer): use selected currency for exchange rate fallback#1538
telestrial wants to merge 1 commit into
mainfrom
08-19-fix_explorer_use_selected_currency_for_exchange_rate_fallback

Conversation

@telestrial

@telestrial telestrial commented Aug 19, 2026

Copy link
Copy Markdown
Contributor

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.

@vercel

vercel Bot commented Aug 19, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
explorer Ready Ready Preview Aug 19, 2026 5:48pm
explorer-zen Ready Ready Preview Aug 19, 2026 5:48pm
3 Skipped Deployments
Project Deployment Actions Updated (UTC)
hostd Ignored Ignored Preview Aug 19, 2026 5:48pm
indexd Ignored Ignored Preview Aug 19, 2026 5:48pm
renterd Ignored Ignored Preview Aug 19, 2026 5:48pm

Request Review

@changeset-bot

changeset-bot Bot commented Aug 19, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 3531357

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
explorer Patch

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

Copy link
Copy Markdown
Contributor Author

This stack of pull requests is managed by Graphite. Learn more about stacking.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 currency argument (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.

Comment on lines 10 to 14
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({

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 alexfreska left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If its currently showing the wrong value this fix definitely makes sense. Could use a test just to be sure.

@telestrial telestrial closed this Aug 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants