Skip to content

Commit

Permalink
Merge pull request #2322 from IntersectMBO/test
Browse files Browse the repository at this point in the history
GovTool v1.0.25
  • Loading branch information
MSzalowski authored Nov 4, 2024
2 parents 2b60935 + ecb78d3 commit 343854d
Show file tree
Hide file tree
Showing 16 changed files with 52 additions and 27 deletions.
19 changes: 19 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion govtool/backend/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion govtool/backend/Dockerfile.qovery
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions govtool/backend/sql/list-dreps.sql
Original file line number Diff line number Diff line change
Expand Up @@ -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 ?
)
Expand Down
3 changes: 3 additions & 0 deletions govtool/backend/src/VVA/DRep.hs
Original file line number Diff line number Diff line change
Expand Up @@ -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 <> "%"
)
Expand Down
2 changes: 1 addition & 1 deletion govtool/backend/vva-be.cabal
Original file line number Diff line number Diff line change
@@ -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:
Expand Down
4 changes: 2 additions & 2 deletions govtool/frontend/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions govtool/frontend/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@govtool/frontend",
"private": true,
"version": "1.0.24",
"version": "1.0.25",
"type": "module",
"scripts": {
"build": "vite build",
Expand Down Expand Up @@ -109,5 +109,5 @@
"typescript": "^5.0.2"
},
"readme": "ERROR: No README data found!",
"_id": "[email protected].24"
"_id": "[email protected].25"
}
Original file line number Diff line number Diff line change
Expand Up @@ -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<DashboardActionCardProps> = (() => {
// transaction in progress
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 };
Expand Down
15 changes: 8 additions & 7 deletions govtool/frontend/src/pages/RegisterAsdRep.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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 } },
);
}
}}
/>
</CenteredBoxPageWrapper>
);
Expand Down
3 changes: 1 addition & 2 deletions govtool/frontend/src/services/requests/getDRepList.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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)),
),
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
},
};

Expand Down
4 changes: 2 additions & 2 deletions govtool/metadata-validation/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion govtool/metadata-validation/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@govtool/metadata-validation",
"version": "1.0.24",
"version": "1.0.25",
"description": "",
"author": "",
"private": true,
Expand Down
2 changes: 1 addition & 1 deletion govtool/metadata-validation/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 343854d

Please sign in to comment.