-
Notifications
You must be signed in to change notification settings - Fork 619
[Dashboard] Fix NFT supply info #5309
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
|
Your org has enabled the Graphite merge queue for merging into mainAdd the label “merge-queue” to the PR and Graphite will automatically add it to the merge queue when it’s ready to merge. Or use the label “hotfix” to add to the merge queue as a hot fix. You must have a Graphite account and log in to Graphite in order to use the merge queue. Sign up using this link. |
|
This stack of pull requests is managed by Graphite. Learn more about stacking. |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #5309 +/- ##
=======================================
Coverage 45.59% 45.59%
=======================================
Files 1069 1069
Lines 55584 55584
Branches 4045 4045
=======================================
Hits 25342 25342
Misses 29552 29552
Partials 690 690
*This pull request uses carry forward flags. Click here to find out more. |
size-limit report 📦
|
df04c53 to
2d6b751
Compare
2d6b751 to
24ffda1
Compare
...rd/src/app/(dashboard)/(chain)/[chain_id]/[contractAddress]/nfts/components/supply-cards.tsx
Outdated
Show resolved
Hide resolved
24ffda1 to
acc7674
Compare
Merge activity
|
## Problem solved
Short description of the bug fixed or feature added
<!-- start pr-codex -->
---
## PR-Codex overview
This PR focuses on enhancing the `SupplyCards` component by updating how supply data is fetched and displayed, specifically by introducing the `startTokenId` and refining the calculation of unclaimed supply.
### Detailed summary
- Added `startTokenId` to the imports from `thirdweb/extensions/erc721`.
- Changed `claimedSupplyQuery` to `nextTokenIdQuery`.
- Introduced `startTokenIdQuery` for calculating the real total supply.
- Updated unclaimed supply calculation to use `realTotalSupply`.
- Adjusted loading states and displayed values for total supply and unclaimed supply.
> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}`
<!-- end pr-codex -->
acc7674 to
6030bf1
Compare

Problem solved
Short description of the bug fixed or feature added
PR-Codex overview
This PR updates the
SupplyCardscomponent to improve how token supply data is fetched and calculated. It introduces a new query for thestartTokenIdand refactors the calculation ofunclaimedSupplyusinguseMemofor better performance.Detailed summary
startTokenIdimport fromthirdweb/extensions/erc721.claimedSupplyQuerytonextTokenIdQuery.startTokenIdQueryto fetch the starting token ID.unclaimedSupplycalculation usinguseMemo.