From 2d7a55daba3823e3c6bc7f3a0d79d03fda5f9e83 Mon Sep 17 00:00:00 2001 From: Fouad Date: Fri, 21 Oct 2022 09:55:58 +0100 Subject: [PATCH] fix duplicate delegations (#1697) --- nym-wallet/src/components/Delegation/DelegationList.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/nym-wallet/src/components/Delegation/DelegationList.tsx b/nym-wallet/src/components/Delegation/DelegationList.tsx index 91fccfdf0a..436b5e027d 100644 --- a/nym-wallet/src/components/Delegation/DelegationList.tsx +++ b/nym-wallet/src/components/Delegation/DelegationList.tsx @@ -57,6 +57,7 @@ function descendingComparator(a: any, b: any, orderBy: string) { } return 0; } +// Sorting function needs fixing function sortPendingDelegation(a: DelegationWithEvent, b: DelegationWithEvent) { if (isPendingDelegation(a) && isPendingDelegation(b)) return 0; @@ -154,7 +155,7 @@ export const DelegationList: React.FC<{ {items?.length ? ( - items.sort(getComparator(order, orderBy)).map((item) => ( + items.map((item) => (