-
Notifications
You must be signed in to change notification settings - Fork 71
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
Update validator list columns #4643
Changes from 1 commit
f1cad4c
37309ed
d88782c
655918f
4356888
d97d1f7
b1009e4
bc55bc3
9d27b60
1af4264
2395f88
ea01220
4a2840d
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,8 +19,10 @@ export const ValidatorsList = ({ validators }: ValidatorsListProps) => { | |
<ListHeader>Validator</ListHeader> | ||
<ListHeader>Verification</ListHeader> | ||
<ListHeader>State</ListHeader> | ||
<ListHeader>Total Reward</ListHeader> | ||
<ListHeader>APR</ListHeader> | ||
<ListHeader>Own Stake</ListHeader> | ||
<ListHeader>Total Stake</ListHeader> | ||
<ListHeader>Expected Nom APR</ListHeader> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I know it's not in the design but personally I could really use a tooltip on "Expected Nom APR" ! WDYT @dmtrjsg ? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Tooltip is 100% warranted. Text: "This column shows the expected APR for nominators who are nominating funds for the chosen validator. The APR is subject to the amount staked and have a diminishing return for higher token amounts." |
||
<ListHeader>Comission</ListHeader> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
</ListHeaders> | ||
<List> | ||
{validators?.map((validator) => ( | ||
|
@@ -55,7 +57,7 @@ const ListHeaders = styled.div` | |
display: grid; | ||
grid-area: validatorstablenav; | ||
grid-template-rows: 1fr; | ||
grid-template-columns: 250px 80px 80px 120px 80px 120px; | ||
grid-template-columns: 250px 80px 80px repeat(5, 120px); | ||
justify-content: space-between; | ||
width: 100%; | ||
padding-left: 16px; | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -111,6 +111,15 @@ export const useValidatorsList = () => { | |
isActive: activeValidators.includes(address), | ||
totalRewards: rewardHistory.reduce((total: BN, data) => total.add(data.eraReward), new BN(0)), | ||
APR: apr, | ||
commission: validatorInfo.commission.toNumber() / 10 ** 7, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Please add a function in export const perbillToPercent = (perbill: BN) => perbill.toNumber() / 10 ** 7 and use it here to clarify the code a bit. |
||
staking: { | ||
total: stakingInfo.total.toBn(), | ||
own: stakingInfo.own.toBn(), | ||
others: stakingInfo.others.map((nominator) => ({ | ||
address: nominator.who.toString(), | ||
staking: nominator.value.toBn(), | ||
})), | ||
}, | ||
} | ||
}) | ||
) | ||
|
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.
Please add a tooltip next to the "Verification" column header:![image](https://private-user-images.githubusercontent.com/6571453/285492363-97be8fe3-5e03-402d-aefe-f1706b3dbd83.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkyOTA0NDgsIm5iZiI6MTczOTI5MDE0OCwicGF0aCI6Ii82NTcxNDUzLzI4NTQ5MjM2My05N2JlOGZlMy01ZTAzLTQwMmQtYWVmZS1mMTcwNmIzZGJkODMucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI1MDIxMSUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNTAyMTFUMTYwOTA4WiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9ZTgzZjI4NjFiNTUyYWQ4MDc2M2RhMTliYzY0MjIwZTA1NWVkZDBiMjdlOTgyZGJiNDU2NjJmYzkwZDFjMDMwYSZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QifQ.IHIsFC6SzPGdGWX_csoQ9Gw3S1EMC95M6sjhuKTimqo)
The copy could be something like:
But it would be better to have the link point at the "About" tab and add the Working group description to this tab. See #4654
WDYT @dmtrjsg ?
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.
Yes its a good idea, and we could just add the description to the "About" section which is exactly the same as the are on the working group cards on the WG landing page where they are shown as a list.