🔧 server: add base art - #1111
Conversation
🦋 Changeset detectedLatest commit: 23ba566 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
WalkthroughIntroduces a new ChangesBase chain card product support
Sequence Diagram(s)sequenceDiagram
participant Client
participant CardAPI as card.ts (POST /)
participant PandaUtil as server/utils/panda.ts
participant PandaAPI as Panda External API
participant DB as cards table
Client->>CardAPI: POST /card (chain.id, credential.source)
CardAPI->>CardAPI: compute productId<br/>(chain.id === base.id && source → SIGNATURE)<br/>(chain.id === base.id → BASE)<br/>(other → SIGNATURE)
CardAPI->>PandaUtil: createCard(pandaId, productId)
PandaUtil->>PandaUtil: look up virtualCardArt[productId]
PandaUtil->>PandaAPI: POST create card with productId + artId
PandaAPI-->>PandaUtil: cardId
PandaUtil-->>CardAPI: cardId
CardAPI->>DB: INSERT cards (productId, ...)
CardAPI->>CardAPI: emit CardIssued(productId)
CardAPI-->>Client: 200 { productId, ... }
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Suggested reviewers
🚥 Pre-merge checks | ✅ 4✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
✨ Simplify code
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Code Review
This pull request introduces support for a new Base product card (product ID "408") alongside the existing Platinum and Signature cards. The card creation logic is updated to dynamically select the product ID based on the blockchain network, defaulting to the Base card on the Base chain (unless an override source is matched) and the Signature card on other chains. Corresponding updates are made to the schemas, utility functions, and test suite. Feedback highlights a critical bug where users upgrading from a Platinum card on the Base chain would incorrectly receive a Base card instead of a Signature card.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
There was a problem hiding this comment.
Actionable comments posted: 1
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: ASSERTIVE
Plan: Pro
Run ID: caac351b-773a-43d1-8eee-fc88aacf378b
📒 Files selected for processing (5)
.changeset/swift-melons-collab.mdcommon/panda.tsserver/api/card.tsserver/test/api/card.test.tsserver/utils/panda.ts
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 23ba566d6a
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1111 +/- ##
==========================================
- Coverage 76.02% 75.99% -0.03%
==========================================
Files 245 245
Lines 12044 12010 -34
Branches 4284 4299 +15
==========================================
- Hits 9156 9127 -29
+ Misses 2572 2570 -2
+ Partials 316 313 -3
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Summary by CodeRabbit
New Features
Bug Fixes