Skip to content

fix(keychain): route card purchases through credits - #2661

Merged
tarrencev merged 5 commits into
mainfrom
centaur/card-credits-preview-20260721
Jul 21, 2026
Merged

tarrencev merged 5 commits into
mainfrom
centaur/card-credits-preview-20260721

Conversation

@joystick-gg

@joystick-gg joystick-gg Bot commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

Defaults to the Credits rail whenever the existing balance covers the starter-pack purchase, even when Credit Card was previously remembered. When credits are insufficient and Credit Card is selected, routes through the existing credits deposit flow and automatically resumes the bundle purchase after settlement. Replaces the direct Coinflow starter-pack total with the authoritative credits quote and renders the payment unit as USD, with regression coverage for preference resolution, card routing, shortfall rounding, and minimum deposits.

This replacement uses a shorter branch name so the Next.js preview can embed the matching keychain preview iframe directly without Vercel truncating each project alias to a different hash. Validated with keychain lint, formatting, production build, 757 passing tests, and a Playwright-rendered Storybook check; the repository-wide pre-commit build's live GraphQL codegen timed out against api.cartridge.gg, so the commits used the already validated checked-in generated schema.

Prompted by: tarrence

@vercel

vercel Bot commented Jul 21, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
controller-example-next Ready Ready Preview Jul 21, 2026 6:53pm
controller-ui Ready Ready Preview Jul 21, 2026 6:53pm
keychain Ready Ready Preview Jul 21, 2026 6:53pm
keychain-storybook Ready Ready Preview Jul 21, 2026 6:53pm

Request Review

@codecov

codecov Bot commented Jul 21, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 32.22222% with 61 lines in your changes missing coverage. Please review.
✅ Project coverage is 28.78%. Comparing base (f19fb35) to head (79450c9).
⚠️ Report is 54 commits behind head on main.

Files with missing lines Patch % Lines
...s/keychain/src/components/purchase/review/cost.tsx 0.00% 34 Missing ⚠️
...src/components/purchase/checkout/onchain/index.tsx 0.00% 24 Missing ⚠️
...src/components/credits/CoinbaseCreditsCheckout.tsx 50.00% 1 Missing ⚠️
...src/components/credits/CoinflowCreditsCheckout.tsx 50.00% 1 Missing ⚠️
packages/keychain/src/utils/payment-preference.ts 88.88% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2661      +/-   ##
==========================================
+ Coverage   23.68%   28.78%   +5.09%     
==========================================
  Files         352      378      +26     
  Lines       42485    48052    +5567     
  Branches     1370     2089     +719     
==========================================
+ Hits        10064    13831    +3767     
- Misses      32398    34179    +1781     
- Partials       23       42      +19     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@tarrencev
tarrencev merged commit 2032b7a into main Jul 21, 2026
14 of 15 checks passed
@tarrencev
tarrencev deleted the centaur/card-credits-preview-20260721 branch July 21, 2026 18:57
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