From 232302fbc45464e56496cf674e182f08c081aa0e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Sza=C5=82owski?= Date: Thu, 5 Sep 2024 08:36:11 +0200 Subject: [PATCH 1/2] fix(#1934): make displaying own DRep in DRep directory available --- CHANGELOG.md | 2 +- .../src/pages/DRepDirectoryContent.tsx | 34 +++++++------------ 2 files changed, 14 insertions(+), 22 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index bfd082028..d168f37d5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -20,7 +20,7 @@ changes. ### Changed -- +- Make displaying own DRep in DRep directory available [Issue 1934](https://github.com/IntersectMBO/govtool/issues/1934) ### Removed diff --git a/govtool/frontend/src/pages/DRepDirectoryContent.tsx b/govtool/frontend/src/pages/DRepDirectoryContent.tsx index 8fe12aae3..98b5aa417 100644 --- a/govtool/frontend/src/pages/DRepDirectoryContent.tsx +++ b/govtool/frontend/src/pages/DRepDirectoryContent.tsx @@ -208,27 +208,19 @@ export const DRepDirectoryContent: FC = ({ }} > {dRepList?.length === 0 && } - {dRepListToDisplay?.map((dRep) => { - if ( - isSameDRep(dRep, myDrep?.view) || - isSameDRep(dRep, inProgressDelegation) - ) { - return null; - } - return ( - - delegate(dRep.drepId)} - /> - - ); - })} + {dRepListToDisplay?.map((dRep) => ( + + delegate(dRep.drepId)} + /> + + ))} {dRepListHasNextPage && dRepList.length >= 10 && ( From 5621db0d7f2e8e0fcfc2f88a60bb5a52929072c1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Sza=C5=82owski?= Date: Thu, 5 Sep 2024 08:42:43 +0200 Subject: [PATCH 2/2] fix(#1940): handle CIP-119 doNotList field --- CHANGELOG.md | 2 +- .../src/pages/DRepDirectoryContent.tsx | 29 ++++++++++--------- 2 files changed, 17 insertions(+), 14 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d168f37d5..acc87f4fa 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,7 +16,7 @@ changes. ### Fixed -- +- Handle CIP-119 doNotList field [Issue 1940](https://github.com/IntersectMBO/govtool/issues/1940) ### Changed diff --git a/govtool/frontend/src/pages/DRepDirectoryContent.tsx b/govtool/frontend/src/pages/DRepDirectoryContent.tsx index 98b5aa417..e9cf347fb 100644 --- a/govtool/frontend/src/pages/DRepDirectoryContent.tsx +++ b/govtool/frontend/src/pages/DRepDirectoryContent.tsx @@ -208,19 +208,22 @@ export const DRepDirectoryContent: FC = ({ }} > {dRepList?.length === 0 && } - {dRepListToDisplay?.map((dRep) => ( - - delegate(dRep.drepId)} - /> - - ))} + {dRepListToDisplay?.map((dRep) => { + if (dRep.doNotList) return null; + return ( + + delegate(dRep.drepId)} + /> + + ); + })} {dRepListHasNextPage && dRepList.length >= 10 && (