-
Notifications
You must be signed in to change notification settings - Fork 382
Closed
Description
Which package or tool is having this issue?
hydrogen-react
What version of that package or tool are you using?
2025.5.0
What version of Remix are you using?
2.14.0
Steps to Reproduce
- Use the 2025-07 Storefront API and Customer Account API versions
- Fetch order data from Customer Account API that includes USDC currency amounts
- Pass the MoneyV2 data to the
<Money>component from@shopify/hydrogen-react - Run
npm run typecheckin templates/skeleton - Observe TypeScript errors in account order pages
Expected Behavior
The Money component should accept MoneyV2 data from both Storefront API and Customer Account API without TypeScript errors, regardless of currency code differences between the APIs.
Actual Behavior
TypeScript compilation fails with the following error:
Type 'Pick<MoneyV2, "amount" | "currencyCode">' is not assignable to type 'PartialObjectDeep<MoneyV2, { recurseIntoArrays: true; }>'.
Types of property 'currencyCode' are incompatible.
Type 'CurrencyCode' is not assignable to type 'CurrencyCode | undefined'.
Type '"USDC"' is not assignable to type 'CurrencyCode | undefined'.
Additionally, when the TypeScript issue is resolved, rendering USDC amounts throws a runtime error:
RangeError: Invalid currency code : USDC
Root Cause
The 2025-07 API update added the "USDC" currency code to the Customer Account API's CurrencyCode enum but NOT to the Storefront API's CurrencyCode enum. This creates incompatible MoneyV2 types between the two APIs. Furthermore, the browser's Intl.NumberFormat API doesn't support cryptocurrency codes like USDC.
Additional Context
- USDC (USD Coin) is a stablecoin cryptocurrency that maintains a 1:1 peg with USD
- The Money component only accepts MoneyV2 from storefront-api-types
- Intl.NumberFormat only recognizes ISO 4217 currency codes, not cryptocurrency codes
- This blocks CI for any PR targeting branches with 2025-07 API update
Metadata
Metadata
Assignees
Labels
No labels