diff --git a/explorer-v2/src/components/nodeTable/NodeTableWithAction.tsx b/explorer-v2/src/components/nodeTable/NodeTableWithAction.tsx index d6502d82e8..36fc6dc53e 100644 --- a/explorer-v2/src/components/nodeTable/NodeTableWithAction.tsx +++ b/explorer-v2/src/components/nodeTable/NodeTableWithAction.tsx @@ -29,37 +29,6 @@ function getNodeSaturationPoint( } // Map nodes with rewards data -const mappedNymNodes = ( - nodes: IObservatoryNode[], - epochRewardsData: ExplorerData["currentEpochRewardsData"] -) => - nodes.map((node) => { - const nodeSaturationPoint = getNodeSaturationPoint( - node.total_stake, - epochRewardsData.interval.stake_saturation_point - ); - - const cleanMoniker = DOMPurify.sanitize( - node.self_description.moniker - ).replace(/&/g, "&"); - - return { - name: cleanMoniker, - nodeId: node.node_id, - identity_key: node.identity_key, - countryCode: node.description.auxiliary_details.location || null, - countryName: - countryName(node.description.auxiliary_details.location) || null, - profitMarginPercentage: - +node.rewarding_details.cost_params.profit_margin_percent * 100, - owner: node.bonding_address, - stakeSaturation: nodeSaturationPoint, - qualityOfService: +node.uptime * 100, - }; - }); - -export type MappedNymNodes = ReturnType; -export type MappedNymNode = MappedNymNodes[0]; const mappedNSApiNodes = ( nodes: NS_NODE[], @@ -91,6 +60,9 @@ const mappedNSApiNodes = ( }; }); + export type MappedNymNodes = ReturnType; + export type MappedNymNode = MappedNymNodes[0]; + const NodeTableWithAction = () => { // Use React Query to fetch epoch rewards const {