@@ -12,6 +12,7 @@ import { ValidatorCumulativeVoting } from './ValidatorCumulativeVoting'
1212import { ValidatorLink } from './ValidatorLink'
1313import { useRequiredScopeParam } from '../../hooks/useScopeParam'
1414import { BalancesDiff } from '../BalancesDiff'
15+ import { PercentageValue } from '../PercentageValue'
1516
1617type ValidatorsProps = {
1718 validators ?: Validator [ ]
@@ -64,26 +65,23 @@ export const Validators: FC<ValidatorsProps> = ({ isLoading, limit, pagination,
6465 } ,
6566 {
6667 align : TableCellAlign . Right ,
67- // TODO: provide cumulative voting when it is implemented in the API
68- content : < ValidatorCumulativeVoting containerMarginThemeSpacing = { 5 } value = { 0 } /> ,
68+ content : (
69+ < ValidatorCumulativeVoting
70+ containerMarginThemeSpacing = { 5 }
71+ value = { validator . voting_power_cumulative }
72+ total = { stats ?. total_voting_power }
73+ />
74+ ) ,
6975 key : 'cumulativeVoting' ,
7076 } ,
7177 {
7278 align : TableCellAlign . Right ,
7379 content : (
74- < >
75- { typeof validator ?. voting_power === 'number' && stats ?. total_voting_power
76- ? t ( 'common.valuePair' , {
77- value : validator . voting_power / stats . total_voting_power ,
78- formatParams : {
79- value : {
80- style : 'percent' ,
81- maximumFractionDigits : 2 ,
82- } satisfies Intl . NumberFormatOptions ,
83- } ,
84- } )
85- : t ( 'common.missing' ) }
86- </ >
80+ < PercentageValue
81+ value = { validator . voting_power }
82+ total = { stats ?. total_voting_power }
83+ adaptMaximumFractionDigits
84+ />
8785 ) ,
8886
8987 key : 'voting' ,
0 commit comments