Skip to content
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

feat(explorer): add staking ratio calculation #5614

Open
wants to merge 4 commits into
base: develop
Choose a base branch
from

Conversation

panteleymonchuk
Copy link
Contributor

Description of change

Please write a summary of your changes and why you made them.

Links to any relevant issues

Closes #5607

Type of change

Choose a type of change, and delete any options that are not relevant.

  • Bug fix (a non-breaking change which fixes an issue)
  • Enhancement (a non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation Fix

How the change has been tested

Describe the tests that you ran to verify your changes.

Make sure to provide instructions for the maintainer as well as any relevant configurations.

Change checklist

Tick the boxes that are relevant to your changes, and delete any items that are not.

  • I have followed the contribution guidelines for this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have added tests that prove my fix is effective or that my feature works
  • I have checked that new and existing unit tests pass locally with my changes

@panteleymonchuk panteleymonchuk added tooling Issues related to the Tooling team explorer Issues related to the Explorer labels Feb 25, 2025
@panteleymonchuk panteleymonchuk requested a review from a team as a code owner February 25, 2025 19:43
Copy link

vercel bot commented Feb 25, 2025

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

Name Status Preview Comments Updated (UTC)
rebased-explorer ✅ Ready (Inspect) Visit Preview 💬 Add feedback Feb 27, 2025 8:33am
3 Skipped Deployments
Name Status Preview Comments Updated (UTC)
apps-ui-kit ⬜️ Ignored (Inspect) Visit Preview Feb 27, 2025 8:33am
apps-backend ⬜️ Skipped (Inspect) Feb 27, 2025 8:33am
wallet-dashboard ⬜️ Skipped (Inspect) Feb 27, 2025 8:33am

Copy link
Contributor

@brancoder brancoder left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LG and works well 👍 just a nit about the hardcoded -- values

@@ -105,12 +109,19 @@ function ValidatorPageResult(): JSX.Element {
const lastEpochRewardOnAllValidators =
epochData?.data[0].endOfEpochInfo?.totalStakeRewardsDistributed;

const sortedValidators = activeValidatorsData?.sort(() => 0.5 - Math.random());
const stakingRatio = useMemo(() => {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No need to use useMemo

Copy link
Contributor

@brancoder brancoder left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
explorer Issues related to the Explorer tooling Issues related to the Tooling team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add staking ratio to validators page
3 participants