feat: add total reward info#5678
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
🦋 Changeset detectedLatest commit: e0698ea 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 |
Greptile SummaryThis PR adds total estimated Prime reward information to the leaderboard card. The main changes are:
Confidence Score: 5/5This looks safe to merge.
Important Files Changed
Reviews (2): Last reviewed commit: "feat: update name" | Re-trigger Greptile |
| totalPoolCents: pendingPool | ||
| ? convertUsdMantissaToCents(pendingPool.currentEstimatedTotalUsdMantissa).toNumber() | ||
| : 0, |
There was a problem hiding this comment.
When /prime/cycle/current returns a pending pool without the newly added currentEstimatedTotalUsdMantissa field, this conversion receives undefined and produces NaN. The card then treats NaN as falsy and silently hides the total-pool line, so a backend/frontend rollout mismatch makes the new reward total disappear instead of showing a safe fallback or a clear API error.
| totalPoolCents: pendingPool | |
| ? convertUsdMantissaToCents(pendingPool.currentEstimatedTotalUsdMantissa).toNumber() | |
| : 0, | |
| totalPoolCents: pendingPool | |
| ? convertUsdMantissaToCents(pendingPool.currentEstimatedTotalUsdMantissa ?? '0').toNumber() | |
| : 0, |
Context Used: Ensure the rules defined in the files under .claud... (source)
|
|
||
| {!!totalPoolCents && ( | ||
| <p className="text-b2r text-light-grey"> | ||
| <Trans | ||
| i18nKey="primeLeaderboard.totalRewards.totalPoolLabel" | ||
| components={{ Highlight: <span className="text-white" /> }} | ||
| values={{ amount: formatCentsToReadableValue({ value: totalPoolCents }) }} | ||
| /> | ||
| </p> | ||
| )} |
There was a problem hiding this comment.
When the API returns an active pending pool with currentEstimatedTotalUsdMantissa: "0", totalPoolCents is 0 and this truthiness gate suppresses the new denominator text. The card still shows distributed rewards, but users do not see the $0 total rewards context that this change adds.
Context Used: AGENTS.md (source)
Coverage Report for ./apps/evm
File Coverage
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
@greptile review again |
Jira ticket(s)
VPD-1544
Changes