@@ -14,7 +14,7 @@ import {
1414} from "@hooks" ;
1515import { DataActionsBar , EmptyStateDrepDirectory } from "@molecules" ;
1616import { AutomatedVotingOptions , DRepCard } from "@organisms" ;
17- import { correctAdaFormat , isSameDRep } from "@utils" ;
17+ import { correctAdaFormat , isSameDRep , uniqBy } from "@utils" ;
1818import { DRepData , DRepListSort , DRepStatus } from "@models" ;
1919import {
2020 AutomatedVotingOptionCurrentDelegation ,
@@ -106,8 +106,9 @@ export const DRepDirectoryContent: FC<DRepDirectoryContentProps> = ({
106106
107107 const ada = correctAdaFormat ( votingPower ) ;
108108
109- const listedDRepsWithoutYourself = dRepList ?. filter (
110- ( dRep ) => ! dRep . doNotList && ! isSameDRep ( dRep , myDRepId ) ,
109+ const listedDRepsWithoutYourself = uniqBy (
110+ dRepList ?. filter ( ( dRep ) => ! dRep . doNotList && ! isSameDRep ( dRep , myDRepId ) ) ,
111+ "view" ,
111112 ) ;
112113 const dRepListToDisplay =
113114 yourselfDRep && showYourselfDRep
@@ -212,7 +213,7 @@ export const DRepDirectoryContent: FC<DRepDirectoryContentProps> = ({
212213 >
213214 { dRepList ?. length === 0 && < EmptyStateDrepDirectory /> }
214215 { dRepListToDisplay ?. map ( ( dRep ) => (
215- < Box key = { dRep . drepId } component = "li" sx = { { listStyle : "none" } } >
216+ < Box key = { dRep . view } component = "li" sx = { { listStyle : "none" } } >
216217 < DRepCard
217218 dRep = { dRep }
218219 isConnected = { ! ! isConnected }
0 commit comments