Skip to content

Commit

Permalink
fix: display active number of validators correctly in validator manag…
Browse files Browse the repository at this point in the history
…ment
  • Loading branch information
rickimoore committed Aug 10, 2023
1 parent 39bd11f commit 8836d53
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/components/ValidatorSummary/ValidatorSummary.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,12 @@ import { useTranslation } from 'react-i18next'
import ValidatorIncomeSummary from '../ValidatorIncomeSummary/ValidatorIncomeSummary'
import ActiveValidatorCount from '../ActiveValidatorCount/ActiveValidatorCount'
import OverallEffectiveness from '../OveralEffectiveness/OverallEffectiveness'
import { selectActiveValidators } from '../../recoil/selectors/selectActiveValidators'

const ValidatorSummary = () => {
const { t } = useTranslation()
const validators = useRecoilValue(selectValidatorInfos)
const activeValidators = useRecoilValue(selectActiveValidators)

const totalBalance = useMemo(() => {
return validators.map((validator) => validator.balance).reduce((a, b) => a + b, 0)
Expand All @@ -26,7 +28,7 @@ const ValidatorSummary = () => {
{t('validatorManagement.summary.active')}
</Typography>
<Typography isBold type='text-caption1'>
{validators.length}
{activeValidators.length}
</Typography>
</div>
</div>
Expand Down

0 comments on commit 8836d53

Please sign in to comment.