Correctness
Include the currency in the cache key
src/checkout/session.ts:43A customer switching currencies can receive a cached session with the previous currency. Include currency in the cache key so the session and displayed total stay consistent.
Sample code · no GitHub changes are made
You make the code changes. HeyDeer reviews them.
42 const key = `checkout:${user.id}`;
43 return cache.get(key);Include currency so switching currencies cannot reuse a session with the old total.