-
Notifications
You must be signed in to change notification settings - Fork 559
[TOOL-4867] Dashboard: Fix Coin asset page crash on "unlimited" maxClaimableSupply #7457
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
[TOOL-4867] Dashboard: Fix Coin asset page crash on "unlimited" maxClaimableSupply #7457
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
|
""" WalkthroughThe changes update the handling of unlimited token supply in the dashboard's UI components. Instead of representing unlimited supply as a Changes
Sequence Diagram(s)sequenceDiagram
participant ParentComponent as ClaimTokensUI
participant SupplyClaimedProgress
ParentComponent->>SupplyClaimedProgress: Pass totalSupply (bigint or "unlimited")
SupplyClaimedProgress->>SupplyClaimedProgress: Check if totalSupply === "unlimited"
SupplyClaimedProgress-->>ParentComponent: Render progress (unlimited or finite)
Assessment against linked issues
Suggested reviewers
Warning Review ran into problems🔥 ProblemsErrors were encountered while retrieving linked issues. Errors (1)
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (3)
🚧 Files skipped from review as they are similar to previous changes (3)
⏰ Context from checks skipped due to timeout of 90000ms (8)
✨ Finishing Touches
🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
How to use the Graphite Merge QueueAdd either label to this PR to merge it via the merge queue:
You must have a Graphite account in order to use the merge queue. Sign up using this link. An organization admin has enabled the Graphite Merge Queue in this repository. Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue. 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 #7457 +/- ##
=======================================
Coverage 51.92% 51.92%
=======================================
Files 947 947
Lines 63932 63932
Branches 4216 4216
=======================================
Hits 33194 33194
Misses 30632 30632
Partials 106 106
🚀 New features to boost your workflow:
|
size-limit report 📦
|
Merge activity
|
…aimableSupply (#7457) <!-- ## title your PR with this format: "[SDK/Dashboard/Portal] Feature/Fix: Concise title for the changes" If you did not copy the branch name from Linear, paste the issue tag here (format is TEAM-0000): ## Notes for the reviewer Anything important to call out? Be sure to also clarify these in your comments. ## How to test Unit tests, playground, etc. --> <!-- start pr-codex --> --- ## PR-Codex overview This PR focuses on updating the handling of the `totalSupply` property in the `SupplyClaimedProgress` component and related files to support the string value `"unlimited"` instead of using a constant value from `thirdweb/utils`. ### Detailed summary - Changed `totalSupply` type from `bigint` to `bigint | "unlimited"` in `SupplyClaimedProgress`. - Updated the condition to check for `"unlimited"` instead of `maxUint256`. - Modified the story for `SupplyClaimedProgress` to use `"unlimited"` instead of `maxUint256`. - Adjusted `totalSupply` handling in `TokenDropClaim` to return `"unlimited"` if `maxClaimableSupply` equals `maxUint256`. > ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}` <!-- end pr-codex --> <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Updated the supply progress display to clearly indicate when the total supply is unlimited. * **Refactor** * Improved internal handling and representation of unlimited supply for better clarity in the UI. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
451e663
to
dbc0316
Compare
PR-Codex overview
This PR focuses on updating the handling of
totalSupply
in theSupplyClaimedProgress
component and related files, changing its type to allow for the string "unlimited" instead of just abigint
. This improves the representation of supply status in the application.Detailed summary
totalSupply
type inSupplyClaimedProgress
frombigint
tobigint | "unlimited"
.totalSupply
as "unlimited" instead ofmaxUint256
.SupplyClaimedProgress
to use "unlimited" instead ofmaxUint256
.totalSupply
logic inTokenDropClaim
to return "unlimited" whenmaxClaimableSupply
equalsmaxUint256
.Summary by CodeRabbit