PR #128

Checkout refactor — review

Reviewed 14 files · 320 additions, 96 deletions.

Approve with nits — nothing blocking

Findings

Unhandled rejection in applyCoupon()

A failed coupon lookup throws past the try/catch and 500s the whole cart. Wrap the await and surface a field error.

Totals recompute on every keystroke

useMemo deps include the whole cart object — debounce or narrow the deps to cart.items.

Dead import

formatLegacyPrice is imported but unused in Summary.tsx.