-
Notifications
You must be signed in to change notification settings - Fork 70
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
4326-Validators list - Page and widgets #4375
Merged
Merged
Changes from 1 commit
Commits
Show all changes
47 commits
Select commit
Hold shift + click to select a range
269099f
Add Validators Module to the side menu and add tabs to validators page
eshark9312 4bcb114
Add widgets
eshark9312 fe54303
fix widgets
eshark9312 3a2a812
display info modal on first open the page
eshark9312 6eefcff
get the staking informations using polkadot api
eshark9312 9a6a799
add validators list filter
eshark9312 fcd9a14
fix widgets component and hook, add last reward
eshark9312 2b87f8f
add validators' list- draft
eshark9312 796a230
add 'Total rewards', but not beyond history depth
eshark9312 15ce7ef
remove filter and search box
eshark9312 f972f42
fix validator page notification modal
eshark9312 08bb363
lint:fix
eshark9312 bec3a5c
Update packages/ui/src/validators/components/widgets/Era.tsx
eshark9312 ae82669
Update packages/ui/src/validators/components/widgets/Era.tsx
eshark9312 5880a41
Update packages/ui/src/validators/components/widgets/Rewards.tsx
eshark9312 c0c5e9a
Update packages/ui/src/validators/components/widgets/Rewards.tsx
eshark9312 f0374df
rename 'widgets' to 'statistics','validators.tsx' to 'validatorlist.tsx'
eshark9312 22f9602
add 'nominators' to the widget
eshark9312 b4c7c46
add staking percentage to the widget
eshark9312 e264e1e
add blocks and points to the widget
eshark9312 5d09ef6
fix validators page notification modal
eshark9312 d5f34f2
fix the counter for active nominators
eshark9312 e225bb6
fix the format of staking value
eshark9312 484a510
yarn lint:fix
eshark9312 480cd09
remove route, sidebar item, tab, dashboard, modal
eshark9312 94fd84f
add storybook for validator list page statistics
eshark9312 970824a
fix storybook, remove unused variables
eshark9312 44b3f4a
Update packages/ui/src/app/pages/Validators/ValidatorList.stories.tsx
eshark9312 97f5b58
Update packages/ui/src/app/pages/Validators/ValidatorList.stories.tsx
eshark9312 b027c79
Update packages/ui/src/app/pages/Validators/ValidatorList.stories.tsx
eshark9312 3f38195
Make story values more readable
thesan 0b24a80
Add a special case for `unwrap` methods
thesan bde8bb7
Assign an object to unwrap
thesan 384c159
Update packages/ui/src/common/components/charts/PercentageChart.tsx
eshark9312 889dd70
Update packages/ui/src/validators/constants/constant.ts
eshark9312 59de400
Update packages/ui/src/validators/hooks/useStakingStatistics.tsx
eshark9312 4f77503
Update packages/ui/src/validators/hooks/useStakingStatistics.tsx
eshark9312 18809bc
Update packages/ui/src/validators/hooks/useStakingStatistics.tsx
eshark9312 79214f2
fix rewardPoints
eshark9312 b757b1e
remove InfoModal
eshark9312 7cf3349
fix asChainData helper
eshark9312 e0d19fb
Simplify chain unwrapped mocks
thesan 25ce568
move ERA_DRATION to common/constant/number
eshark9312 ab8a2dd
remove the default value for activeEra, assign undefined instead
eshark9312 afd3e5a
pass the statistic values as props
eshark9312 4a11d92
fix some code to make it clear
eshark9312 43c3824
fix some issue in Era widget
eshark9312 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Last really small detail but this code is mixing an
if
statement and a js type coercion/short-circuit evaluation (I'm not sure what to call it actually 😅). To keep the code clearer please chose one of these 2Either the
if
statement:Or:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have modified the code according to your review so that the storybook seems to be good now.
And in the Piechart,
100%
is never displayed in any case.