fix(governance): filtered out nodes with 0 performance score from homepage list (#4267)
This commit is contained in:
parent
071a6ff8bb
commit
29991015b5
@ -31,6 +31,7 @@ import {
|
|||||||
orderByDate,
|
orderByDate,
|
||||||
orderByUpgradeBlockHeight,
|
orderByUpgradeBlockHeight,
|
||||||
} from '../proposals/components/proposals-list/proposals-list';
|
} from '../proposals/components/proposals-list/proposals-list';
|
||||||
|
import { BigNumber } from '../../lib/bignumber';
|
||||||
|
|
||||||
const nodesToShow = 6;
|
const nodesToShow = 6;
|
||||||
|
|
||||||
@ -248,6 +249,8 @@ const GovernanceHome = ({ name }: RouteChildProps) => {
|
|||||||
|
|
||||||
const activeNodes = removePaginationWrapper(
|
const activeNodes = removePaginationWrapper(
|
||||||
validatorsData?.nodesConnection.edges
|
validatorsData?.nodesConnection.edges
|
||||||
|
).filter((node) =>
|
||||||
|
new BigNumber(node.rankingScore.performanceScore).isGreaterThan(0)
|
||||||
);
|
);
|
||||||
|
|
||||||
const trimmedActiveNodes = activeNodes?.slice(0, nodesToShow);
|
const trimmedActiveNodes = activeNodes?.slice(0, nodesToShow);
|
||||||
|
Loading…
Reference in New Issue
Block a user