diff --git a/CHANGELOG.md b/CHANGELOG.md index 7f7439b6e..786e14151 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,8 +16,27 @@ changes. ### Fixed +- + +### Changed + +- + +### Removed + +- + +## [v1.0.25](https://github.com/IntersectMBO/govtool/releases/tag/v1.0.25) 2024-11-04 + +### Added + +- + +### Fixed + - Fix searching by DRep Given name - Fix displaying the wallet connected modal +- Fix navigating to DRep details [Issue 2307](https://github.com/IntersectMBO/govtool/issues/2307) ### Changed diff --git a/govtool/backend/Dockerfile b/govtool/backend/Dockerfile index 75f61361c..06ee2bdf7 100644 --- a/govtool/backend/Dockerfile +++ b/govtool/backend/Dockerfile @@ -4,4 +4,4 @@ FROM $BASE_IMAGE_REPO:$BASE_IMAGE_TAG WORKDIR /src COPY . . RUN cabal build -RUN cp dist-newstyle/build/x86_64-linux/ghc-9.2.7/vva-be-1.0.24/x/vva-be/build/vva-be/vva-be /usr/local/bin +RUN cp dist-newstyle/build/x86_64-linux/ghc-9.2.7/vva-be-1.0.25/x/vva-be/build/vva-be/vva-be /usr/local/bin diff --git a/govtool/backend/Dockerfile.qovery b/govtool/backend/Dockerfile.qovery index 0ff39f726..5d632f54f 100644 --- a/govtool/backend/Dockerfile.qovery +++ b/govtool/backend/Dockerfile.qovery @@ -4,7 +4,7 @@ FROM $BASE_IMAGE_REPO:$BASE_IMAGE_TAG WORKDIR /src COPY . . RUN cabal build -RUN cp dist-newstyle/build/x86_64-linux/ghc-9.2.7/vva-be-1.0.24/x/vva-be/build/vva-be/vva-be /usr/local/bin +RUN cp dist-newstyle/build/x86_64-linux/ghc-9.2.7/vva-be-1.0.25/x/vva-be/build/vva-be/vva-be /usr/local/bin # Expose the necessary port EXPOSE 9876 diff --git a/govtool/backend/sql/list-dreps.sql b/govtool/backend/sql/list-dreps.sql index ea6414145..043b316d2 100644 --- a/govtool/backend/sql/list-dreps.sql +++ b/govtool/backend/sql/list-dreps.sql @@ -137,6 +137,7 @@ FROM WHERE ( COALESCE(?, '') = '' OR + (CASE WHEN LENGTH(?) % 2 = 0 AND ? ~ '^[0-9a-fA-F]+$' THEN dh.raw = decode(?, 'hex') ELSE false END) OR dh.view ILIKE ? OR off_chain_vote_drep_data.given_name ILIKE ? ) diff --git a/govtool/backend/src/VVA/DRep.hs b/govtool/backend/src/VVA/DRep.hs index 730814e4f..fd4034c12 100644 --- a/govtool/backend/src/VVA/DRep.hs +++ b/govtool/backend/src/VVA/DRep.hs @@ -45,6 +45,9 @@ listDReps mSearchQuery = withPool $ \conn -> do let searchParam = fromMaybe "" mSearchQuery results <- liftIO $ SQL.query conn listDRepsSql ( searchParam + , searchParam + , searchParam + , searchParam , "%" <> searchParam <> "%" , "%" <> searchParam <> "%" ) diff --git a/govtool/backend/vva-be.cabal b/govtool/backend/vva-be.cabal index 5d2376e3b..a3dbffcba 100644 --- a/govtool/backend/vva-be.cabal +++ b/govtool/backend/vva-be.cabal @@ -1,6 +1,6 @@ cabal-version: 3.6 name: vva-be -version: 1.0.24 +version: 1.0.25 -- A short (one-line) description of the package. -- synopsis: diff --git a/govtool/frontend/package-lock.json b/govtool/frontend/package-lock.json index f16bb25d3..776e24278 100644 --- a/govtool/frontend/package-lock.json +++ b/govtool/frontend/package-lock.json @@ -1,12 +1,12 @@ { "name": "@govtool/frontend", - "version": "1.0.24", + "version": "1.0.25", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@govtool/frontend", - "version": "1.0.24", + "version": "1.0.25", "hasInstallScript": true, "dependencies": { "@emotion/react": "^11.11.1", diff --git a/govtool/frontend/package.json b/govtool/frontend/package.json index e00c26a4c..219428f83 100644 --- a/govtool/frontend/package.json +++ b/govtool/frontend/package.json @@ -1,7 +1,7 @@ { "name": "@govtool/frontend", "private": true, - "version": "1.0.24", + "version": "1.0.25", "type": "module", "scripts": { "build": "vite build", @@ -109,5 +109,5 @@ "typescript": "^5.0.2" }, "readme": "ERROR: No README data found!", - "_id": "govtool@1.0.24" + "_id": "govtool@1.0.25" } diff --git a/govtool/frontend/src/components/organisms/DashboardCards/DRepDashboardCard.tsx b/govtool/frontend/src/components/organisms/DashboardCards/DRepDashboardCard.tsx index e5c6f8e77..b9c4338f7 100644 --- a/govtool/frontend/src/components/organisms/DashboardCards/DRepDashboardCard.tsx +++ b/govtool/frontend/src/components/organisms/DashboardCards/DRepDashboardCard.tsx @@ -43,11 +43,13 @@ export const DRepDashboardCard = ({ ), }; - const navigateToDrepDirectory = () => - dRep && - navigate(PATHS.dashboardDRepDirectoryDRep.replace(":dRepId", dRep.view), { - state: { enteredFromWithinApp: true }, - }); + const navigateToDrepDirectory = () => { + if (dRep) { + navigate(PATHS.dashboardDRepDirectoryDRep.replace(":dRepId", dRep.view), { + state: { enteredFromWithinApp: true }, + }); + } + }; const cardProps: Partial = (() => { // transaction in progress diff --git a/govtool/frontend/src/hooks/queries/useGetDrepDetailsQuery.ts b/govtool/frontend/src/hooks/queries/useGetDrepDetailsQuery.ts index ee45f3bb4..9bb53a206 100644 --- a/govtool/frontend/src/hooks/queries/useGetDrepDetailsQuery.ts +++ b/govtool/frontend/src/hooks/queries/useGetDrepDetailsQuery.ts @@ -6,7 +6,7 @@ export const useGetDRepDetailsQuery = ( ) => { const { dRepData, isDRepListLoading } = useGetDRepListInfiniteQuery( { searchPhrase: dRepId ?? undefined }, - { enabled: options?.enabled && !!dRepId }, + { enabled: options?.enabled || !!dRepId }, ); return { dRep: dRepData?.[0], isLoading: isDRepListLoading }; diff --git a/govtool/frontend/src/pages/RegisterAsdRep.tsx b/govtool/frontend/src/pages/RegisterAsdRep.tsx index 2ae4d883b..8d50f42ed 100644 --- a/govtool/frontend/src/pages/RegisterAsdRep.tsx +++ b/govtool/frontend/src/pages/RegisterAsdRep.tsx @@ -79,13 +79,14 @@ export const RegisterAsdRep = () => { title={t(`registration.alreadyRegistered.title`)} description={t(`registration.alreadyRegistered.description`)} primaryButtonText={t("registration.alreadyRegistered.viewDetails")} - onPrimaryButton={() => - dRep && - navigate( - PATHS.dashboardDRepDirectoryDRep.replace(":dRepId", dRep.view), - { state: { enteredFromWithinApp: true } }, - ) - } + onPrimaryButton={() => { + if (dRep) { + navigate( + PATHS.dashboardDRepDirectoryDRep.replace(":dRepId", dRep.view), + { state: { enteredFromWithinApp: true } }, + ); + } + }} /> ); diff --git a/govtool/frontend/src/services/requests/getDRepList.ts b/govtool/frontend/src/services/requests/getDRepList.ts index 89bd84263..532f7ee60 100644 --- a/govtool/frontend/src/services/requests/getDRepList.ts +++ b/govtool/frontend/src/services/requests/getDRepList.ts @@ -51,8 +51,7 @@ export const getDRepList = async ({ const validatedResponse = { ...response.data, elements: await Promise.all( - response.data.elements - .map(async (drep) => mapDtoToDrep(drep)), + response.data.elements.map(async (drep) => mapDtoToDrep(drep)), ), }; diff --git a/govtool/frontend/src/stories/GovernanceActionDetailsCard.stories.ts b/govtool/frontend/src/stories/GovernanceActionDetailsCard.stories.ts index e9b1b0f70..af67453a8 100644 --- a/govtool/frontend/src/stories/GovernanceActionDetailsCard.stories.ts +++ b/govtool/frontend/src/stories/GovernanceActionDetailsCard.stories.ts @@ -108,7 +108,7 @@ export const GovernanceActionDetailsCardComponent: Story = { await expect(canvas.getAllByText(/yes/i)).toHaveLength(2); await expect(canvas.getAllByText(/abstain/i)).toHaveLength(3); - await expect(canvas.getAllByText(/no/i)).toHaveLength(2); + await expect(canvas.getAllByText(/no/i)).toHaveLength(4); }, }; diff --git a/govtool/metadata-validation/package-lock.json b/govtool/metadata-validation/package-lock.json index 594f96fb9..065766942 100644 --- a/govtool/metadata-validation/package-lock.json +++ b/govtool/metadata-validation/package-lock.json @@ -1,12 +1,12 @@ { "name": "@govtool/metadata-validation", - "version": "1.0.24", + "version": "1.0.25", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@govtool/metadata-validation", - "version": "1.0.24", + "version": "1.0.25", "license": "UNLICENSED", "dependencies": { "@nestjs/axios": "^3.0.2", diff --git a/govtool/metadata-validation/package.json b/govtool/metadata-validation/package.json index 6c768ae0e..470f4da8c 100644 --- a/govtool/metadata-validation/package.json +++ b/govtool/metadata-validation/package.json @@ -1,6 +1,6 @@ { "name": "@govtool/metadata-validation", - "version": "1.0.24", + "version": "1.0.25", "description": "", "author": "", "private": true, diff --git a/govtool/metadata-validation/src/main.ts b/govtool/metadata-validation/src/main.ts index 1aefef055..8dc6c2074 100644 --- a/govtool/metadata-validation/src/main.ts +++ b/govtool/metadata-validation/src/main.ts @@ -13,7 +13,7 @@ async function bootstrap() { const config = new DocumentBuilder() .setTitle('Metadata Validation Tool') .setDescription('The Metadata Validation Tool API description') - .setVersion('1.0.24') + .setVersion('1.0.25') .build(); const document = SwaggerModule.createDocument(app, config);