Skip to content

Conversation

@kien-ngo
Copy link
Contributor

@kien-ngo kien-ngo commented Nov 5, 2024

Problem solved

Short description of the bug fixed or feature added


PR-Codex overview

This PR updates the SupplyCards component to improve how token supply data is fetched and calculated. It introduces a new query for the startTokenId and refactors the calculation of unclaimedSupply using useMemo for better performance.

Detailed summary

  • Added startTokenId import from thirdweb/extensions/erc721.
  • Changed the claimedSupplyQuery to nextTokenIdQuery.
  • Introduced startTokenIdQuery to fetch the starting token ID.
  • Refactored unclaimedSupply calculation using useMemo.
  • Updated the displayed values for total and unclaimed supply in the UI.

✨ Ask PR-Codex anything about this PR by commenting with /codex {your question}

@vercel
Copy link

vercel bot commented Nov 5, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
thirdweb-www ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 5, 2024 5:45pm
3 Skipped Deployments
Name Status Preview Comments Updated (UTC)
docs-v2 ⬜️ Skipped (Inspect) Nov 5, 2024 5:45pm
thirdweb_playground ⬜️ Skipped (Inspect) Nov 5, 2024 5:45pm
wallet-ui ⬜️ Skipped (Inspect) Nov 5, 2024 5:45pm

@vercel vercel bot temporarily deployed to Preview – docs-v2 November 5, 2024 12:18 Inactive
@vercel vercel bot temporarily deployed to Preview – thirdweb_playground November 5, 2024 12:18 Inactive
@vercel vercel bot temporarily deployed to Preview – wallet-ui November 5, 2024 12:18 Inactive
@changeset-bot
Copy link

changeset-bot bot commented Nov 5, 2024

⚠️ No Changeset found

Latest commit: 6030bf1

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@graphite-app
Copy link
Contributor

graphite-app bot commented Nov 5, 2024

Your org has enabled the Graphite merge queue for merging into main

Add 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.

@kien-ngo kien-ngo marked this pull request as ready for review November 5, 2024 12:18
Copy link
Contributor Author

kien-ngo commented Nov 5, 2024

This stack of pull requests is managed by Graphite. Learn more about stacking.

Join @kien-ngo and the rest of your teammates on Graphite Graphite

@github-actions github-actions bot added the Dashboard Involves changes to the Dashboard. label Nov 5, 2024
@codecov
Copy link

codecov bot commented Nov 5, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 45.59%. Comparing base (41158b1) to head (6030bf1).
Report is 1 commits behind head on main.

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           
Flag Coverage Δ *Carryforward flag
legacy_packages 65.68% <ø> (ø) Carriedforward from 41158b1
packages 40.70% <ø> (ø)

*This pull request uses carry forward flags. Click here to find out more.

@github-actions
Copy link
Contributor

github-actions bot commented Nov 5, 2024

size-limit report 📦

Path Size Loading time (3g) Running time (snapdragon) Total time
thirdweb (esm) 43 KB (-0.01% 🔽) 861 ms (-0.01% 🔽) 497 ms (+64.79% 🔺) 1.4 s
thirdweb (cjs) 103 KB (0%) 2.1 s (0%) 1.3 s (+24.16% 🔺) 3.3 s
thirdweb (minimal + tree-shaking) 4.85 KB (0%) 97 ms (0%) 21 ms (+19.1% 🔺) 118 ms
thirdweb/chains (tree-shaking) 506 B (0%) 10 ms (0%) 11 ms (-49.86% 🔽) 21 ms
thirdweb/react (minimal + tree-shaking) 17.51 KB (0%) 351 ms (0%) 56 ms (-21.44% 🔽) 407 ms

@kien-ngo kien-ngo force-pushed the kien/fix-nft-supply-card branch from df04c53 to 2d6b751 Compare November 5, 2024 12:28
@vercel vercel bot temporarily deployed to Preview – wallet-ui November 5, 2024 12:28 Inactive
@vercel vercel bot temporarily deployed to Preview – docs-v2 November 5, 2024 12:28 Inactive
@vercel vercel bot temporarily deployed to Preview – thirdweb_playground November 5, 2024 12:28 Inactive
@kien-ngo kien-ngo force-pushed the kien/fix-nft-supply-card branch from 2d6b751 to 24ffda1 Compare November 5, 2024 17:13
@vercel vercel bot temporarily deployed to Preview – docs-v2 November 5, 2024 17:13 Inactive
@vercel vercel bot temporarily deployed to Preview – wallet-ui November 5, 2024 17:13 Inactive
@vercel vercel bot temporarily deployed to Preview – thirdweb_playground November 5, 2024 17:13 Inactive
@kien-ngo kien-ngo force-pushed the kien/fix-nft-supply-card branch from 24ffda1 to acc7674 Compare November 5, 2024 17:16
@vercel vercel bot temporarily deployed to Preview – thirdweb_playground November 5, 2024 17:16 Inactive
@vercel vercel bot temporarily deployed to Preview – wallet-ui November 5, 2024 17:16 Inactive
@vercel vercel bot temporarily deployed to Preview – docs-v2 November 5, 2024 17:16 Inactive
@graphite-app
Copy link
Contributor

graphite-app bot commented Nov 5, 2024

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 -->
@kien-ngo kien-ngo force-pushed the kien/fix-nft-supply-card branch from acc7674 to 6030bf1 Compare November 5, 2024 17:35
@vercel vercel bot temporarily deployed to Preview – thirdweb_playground November 5, 2024 17:35 Inactive
@vercel vercel bot temporarily deployed to Preview – docs-v2 November 5, 2024 17:35 Inactive
@vercel vercel bot temporarily deployed to Preview – wallet-ui November 5, 2024 17:35 Inactive
@graphite-app graphite-app bot merged commit 6030bf1 into main Nov 5, 2024
31 of 32 checks passed
@graphite-app graphite-app bot deleted the kien/fix-nft-supply-card branch November 5, 2024 17:46
@vercel vercel bot temporarily deployed to Production – docs-v2 November 5, 2024 17:46 Inactive
@vercel vercel bot temporarily deployed to Production – thirdweb_playground November 5, 2024 17:46 Inactive
@vercel vercel bot temporarily deployed to Production – wallet-ui November 5, 2024 17:46 Inactive
@kien-ngo kien-ngo self-assigned this Nov 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Dashboard Involves changes to the Dashboard.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants