diff --git a/src/components/DelegationPool/DelegationList/index.tsx b/src/components/DelegationPool/DelegationList/index.tsx index 1d4a3eb3f4..a47d0f37a6 100644 --- a/src/components/DelegationPool/DelegationList/index.tsx +++ b/src/components/DelegationPool/DelegationList/index.tsx @@ -1,5 +1,4 @@ import { Box, useTheme } from "@mui/material"; -import { get } from "lodash"; import { useTranslation } from "react-i18next"; import { useEffect, useRef, useState } from "react"; import { useHistory } from "react-router-dom"; @@ -23,7 +22,6 @@ import { SearchContainer, ShowRetiredPools, StyledInput, - StyledLinearProgress, SubmitButton, TopSearchContainer } from "./styles"; @@ -63,14 +61,14 @@ const DelegationLists: React.FC = () => { } }, [fetchData.initialized, history]); - const columns: Column[] = [ + const columns: Column[] = [ { title: t("glossary.pool"), key: "poolName", minWidth: "200px", maxWidth: "200px", render: (r) => ( - + {r.poolName || `${getShortHash(r.poolId)}`} @@ -79,15 +77,6 @@ const DelegationLists: React.FC = () => { ) }, - { - title: t("common.ticker") + " ", - key: "tickerName", - minWidth: "120px", - render: (r) => {r.tickerName}, - sort: ({ columnKey, sortValue }) => { - sortValue ? setSort(`${columnKey},${sortValue}`) : setSort(""); - } - }, { title: ( @@ -116,19 +105,12 @@ const DelegationLists: React.FC = () => { }, { title: t("glossary.saturation"), - minWidth: "200px", + minWidth: "120px", key: "saturation", render: (r) => r.saturation != null ? ( - - - {formatPercent(r.saturation / 100) || `0%`} - - 100 ? 100 : get(r, "saturation", 0)} - /> + + {formatPercent(r.saturation / 100) || `0%`} ) : ( t("common.N/A") @@ -137,15 +119,6 @@ const DelegationLists: React.FC = () => { sortValue ? setSort(`${columnKey},${sortValue}`) : setSort(""); } }, - { - title: t("glossary.numberOfDelegators"), - minWidth: "200px", - key: "numberDelegators", - render: (r) => {r.numberDelegators || 0}, - sort: ({ columnKey, sortValue }) => { - sortValue ? setSort(`${columnKey},${sortValue}`) : setSort(""); - } - }, { title: t("glossary.blocksInEpoch"), key: "epochBlock", @@ -165,28 +138,19 @@ const DelegationLists: React.FC = () => { } }, { - title: ( - - {t("glossary.fixedCost")} () - - ), - key: "pu.fixedCost", + title: t("votingPower") + " ", + key: "votingPower", minWidth: "120px", - render: (r) => ( - - {formatADAFull(r.feeAmount)}  - - - ), + render: (r) => `${formatPercent(r.votingPower)}`, sort: ({ columnKey, sortValue }) => { sortValue ? setSort(`${columnKey},${sortValue}`) : setSort(""); } }, { - title: t("margin") + " ", - key: "margin", + title: t("governanceParticipationRate") + " ", + key: "governanceParticipationRate", minWidth: "120px", - render: (r) => `${formatPercent(r.feePercent)}`, + render: (r) => `${formatPercent(r.governanceParticipationRate)}`, sort: ({ columnKey, sortValue }) => { sortValue ? setSort(`${columnKey},${sortValue}`) : setSort(""); } diff --git a/src/locales/en/translation.json b/src/locales/en/translation.json index 42eb5faddf..7d6ae72dff 100644 --- a/src/locales/en/translation.json +++ b/src/locales/en/translation.json @@ -307,6 +307,8 @@ "saturation": "Saturation", "fixedCost": "Fixed Cost", "margin": "Margin", + "votingPower": "Voting Power", + "governanceParticipationRate": "Governance Participation Rate", "declaredPledge": "Declared Pledge", "epochBlocks": "Epoch Blocks", "lifetimeBlocks": "Lifetime Blocks", @@ -1013,5 +1015,5 @@ "bolnisi.verifyErrorTooltip": "A connection to the verification service could not be established.", "bolnisi.verifyErrorTooltipTryAgain": "Please, refresh the page to try again.", "bolnisi.verifyError": "Verification Unavailable", - "account.myProfile":"My Profile" + "account.myProfile": "My Profile" } diff --git a/src/types/delegationPools.d.ts b/src/types/delegationPools.d.ts index 5ee7a75988..f3a8d46128 100644 --- a/src/types/delegationPools.d.ts +++ b/src/types/delegationPools.d.ts @@ -12,20 +12,21 @@ interface OverViewDelegation { } interface Delegators { + id: number; poolId: string; poolName: string; + tickerName: string; poolSize: number; - reward: number; - feePercent: number; - feeAmount: number; pledge: number; saturation: number; - stakeLimit; - numberDelegators?: number; - lifetimeBlock?: number; - lifetimeRos?: number; - epochBlock?: number; - tickerName?: string; + stakeLimit: number; + reserves: number; + epochBlock: number; + lifetimeBlock: number; + votingPower: number; + governanceParticipationRate: number; + retired: boolean; + kparam: number; } interface DelegationOverview {