Skip to content

fix(DTCT-2578): stale currency - #10

Open
szymonfe wants to merge 1 commit into
mainfrom
fix/stale-currency
Open

fix(DTCT-2578): stale currency#10
szymonfe wants to merge 1 commit into
mainfrom
fix/stale-currency

Conversation

@szymonfe

@szymonfe szymonfe commented May 13, 2026

Copy link
Copy Markdown
  • Clear stale cart cache on country change: When switching countries via the localization panel, the React Query ['selection'] cache is now removed
    before navigating. Previously, the cached cart data (including currency and shipping methods from the old country) could persist across navigation due
    to the 10-second staleTime, causing the UI to display the wrong currency after a country switch.
    • Fix api-token cookie options in server actions: changeLocale and login were setting the api-token cookie via cookieStore.set(name, value), which uses
      Next.js defaults (httpOnly: true). This made the token temporarily unreadable by client-side centraFetch (which reads document.cookie). Now uses
      cookieStore.set({ ...apiTokenCookie, value }) to preserve the correct cookie options — matching how register, logout, and the routing proxy already set
      it.

@vercel

vercel Bot commented May 13, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
centra-commerce Ready Ready Preview May 13, 2026 7:35am

Request Review

@szymonfe szymonfe changed the title fix: stale currency fix(DTCT-2578): stale currency May 13, 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.

1 participant