From d272dfd6590b8a94e3daf5eec3e81316866c8d80 Mon Sep 17 00:00:00 2001 From: Ryan Williams Date: Thu, 23 Jan 2025 22:30:18 +0000 Subject: [PATCH 1/7] change: copy for governance action details --- .../GovernanceActionNewConstitutionDetailsTabContent.tsx | 4 ++-- govtool/frontend/src/i18n/locales/en.json | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/govtool/frontend/src/components/molecules/GovernanceActionNewConstitutionDetailsTabContent.tsx b/govtool/frontend/src/components/molecules/GovernanceActionNewConstitutionDetailsTabContent.tsx index 82e9e26f5..6a9b1b01c 100644 --- a/govtool/frontend/src/components/molecules/GovernanceActionNewConstitutionDetailsTabContent.tsx +++ b/govtool/frontend/src/components/molecules/GovernanceActionNewConstitutionDetailsTabContent.tsx @@ -13,14 +13,14 @@ export const GovernanceActionNewConstitutionDetailsTabContent = ({ 1600 ? "longText" : "oneLine"} /> 1600 ? "longText" : "oneLine"} diff --git a/govtool/frontend/src/i18n/locales/en.json b/govtool/frontend/src/i18n/locales/en.json index 0b2642110..31026ccd2 100644 --- a/govtool/frontend/src/i18n/locales/en.json +++ b/govtool/frontend/src/i18n/locales/en.json @@ -344,8 +344,8 @@ "about": "About", "abstract": "Abstract", "amount": "Amount:", - "anchorURL": "Anchor URL", - "anchorHash": "Anchor Hash", + "anchorURL": "Metadata anchor link", + "anchorHash": "Metadata anchor hash", "backToGovActions": "Back to Governance Actions", "castVote": "<0>You voted {{vote}} on this proposal\non {{date}} (Epoch {{epoch}})", "castVoteDeadline": "You can change your vote up to {{date}} (Epoch {{epoch}})", From f169fca008f52bb22774dbf012cdcee112fcc3a9 Mon Sep 17 00:00:00 2001 From: Ryan Williams Date: Thu, 23 Jan 2025 22:31:03 +0000 Subject: [PATCH 2/7] change: order of new constitution detials element --- ...ernanceActionNewConstitutionDetailsTabContent.tsx | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/govtool/frontend/src/components/molecules/GovernanceActionNewConstitutionDetailsTabContent.tsx b/govtool/frontend/src/components/molecules/GovernanceActionNewConstitutionDetailsTabContent.tsx index 6a9b1b01c..8fb538e67 100644 --- a/govtool/frontend/src/components/molecules/GovernanceActionNewConstitutionDetailsTabContent.tsx +++ b/govtool/frontend/src/components/molecules/GovernanceActionNewConstitutionDetailsTabContent.tsx @@ -13,16 +13,16 @@ export const GovernanceActionNewConstitutionDetailsTabContent = ({ 1600 ? "longText" : "oneLine"} /> 1600 ? "longText" : "oneLine"} /> From 9e3faa8aaf5f2f5062061ee9a8dd4aed9f92a784 Mon Sep 17 00:00:00 2001 From: Ryan Williams Date: Thu, 23 Jan 2025 22:33:23 +0000 Subject: [PATCH 3/7] docs: update changelog --- CHANGELOG.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9a1ff8810..b663ddfd3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -20,7 +20,8 @@ changes. ### Changed -- +- Change labelling of governance action metadata anchor +- Change labelling and order of new constitution governance action details ### Removed From f0acd6a7c0e819b13fd4c97ec5b4381c68045a3e Mon Sep 17 00:00:00 2001 From: Ryan Williams Date: Thu, 23 Jan 2025 23:27:34 +0000 Subject: [PATCH 4/7] change: new constitution link has a link button --- .../GovernanceActionNewConstitutionDetailsTabContent.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/govtool/frontend/src/components/molecules/GovernanceActionNewConstitutionDetailsTabContent.tsx b/govtool/frontend/src/components/molecules/GovernanceActionNewConstitutionDetailsTabContent.tsx index 8fb538e67..f5f613947 100644 --- a/govtool/frontend/src/components/molecules/GovernanceActionNewConstitutionDetailsTabContent.tsx +++ b/govtool/frontend/src/components/molecules/GovernanceActionNewConstitutionDetailsTabContent.tsx @@ -12,7 +12,7 @@ export const GovernanceActionNewConstitutionDetailsTabContent = ({ return ( Date: Fri, 24 Jan 2025 09:50:42 +0100 Subject: [PATCH 5/7] fix(#2711): fix opening ipfs links --- CHANGELOG.md | 2 +- govtool/frontend/src/utils/openInNewTab.ts | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 33361cc39..e49f54ac0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,7 +16,7 @@ changes. ### Fixed -- +- Fix opening IPFS links [Issue 2711](https://github.com/IntersectMBO/govtool/issues/2711) ### Changed diff --git a/govtool/frontend/src/utils/openInNewTab.ts b/govtool/frontend/src/utils/openInNewTab.ts index 9c454f5e4..847b0ed5d 100644 --- a/govtool/frontend/src/utils/openInNewTab.ts +++ b/govtool/frontend/src/utils/openInNewTab.ts @@ -3,6 +3,8 @@ export const openInNewTab = (url: string) => { const fullUrl = url.startsWith("http://") || url.startsWith("https://") ? url + : url.startsWith("ipfs") + ? `${process.env.VITE_IPFS_GATEWAY}/${url.slice(7)}` : `https://${url}`; const newWindow = window.open(fullUrl, "_blank", "noopener,noreferrer"); From 5e42a0ae59ab6b15a49a89d968a4b3f786e2c12e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Sza=C5=82owski?= Date: Fri, 24 Jan 2025 11:56:30 +0100 Subject: [PATCH 6/7] fix: fetching latest voting anchor images --- govtool/backend/sql/list-dreps.sql | 35 ++++++++++++++++++++---------- 1 file changed, 23 insertions(+), 12 deletions(-) diff --git a/govtool/backend/sql/list-dreps.sql b/govtool/backend/sql/list-dreps.sql index b33a46cfc..0a6d92d1e 100644 --- a/govtool/backend/sql/list-dreps.sql +++ b/govtool/backend/sql/list-dreps.sql @@ -67,19 +67,30 @@ FetchError AS ( ), LatestExistingVotingAnchor AS ( SELECT - dr.id AS drep_registration_id, - dr.drep_hash_id, - va.id AS voting_anchor_id, - va.url, - encode(va.data_hash, 'hex') AS metadata_hash - FROM - drep_registration dr - JOIN voting_anchor va ON dr.voting_anchor_id = va.id - JOIN off_chain_vote_data ocvd ON va.id = ocvd.voting_anchor_id + subquery.drep_registration_id, + subquery.drep_hash_id, + subquery.voting_anchor_id, + subquery.url, + subquery.metadata_hash, + subquery.ocvd_id + FROM ( + SELECT + dr.id AS drep_registration_id, + dr.drep_hash_id, + va.id AS voting_anchor_id, + va.url, + encode(va.data_hash, 'hex') AS metadata_hash, + ocvd.id AS ocvd_id, + ROW_NUMBER() OVER (PARTITION BY dr.drep_hash_id ORDER BY dr.tx_id DESC) AS rn + FROM + drep_registration dr + JOIN voting_anchor va ON dr.voting_anchor_id = va.id + JOIN off_chain_vote_data ocvd ON va.id = ocvd.voting_anchor_id + WHERE + ocvd.voting_anchor_id IS NOT NULL + ) subquery WHERE - ocvd.voting_anchor_id IS NOT NULL - ORDER BY - dr.tx_id DESC + subquery.rn = 1 ), HasNonDeregisterVotingAnchor AS ( SELECT From feae39afcfeafbfb736f7a8460b2750fa15df5f0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Sza=C5=82owski?= Date: Fri, 24 Jan 2025 12:56:52 +0100 Subject: [PATCH 7/7] chore: bump GovTool to v2.0.9 --- CHANGELOG.md | 18 ++++++++++++++++++ govtool/backend/Dockerfile | 2 +- govtool/backend/Dockerfile.qovery | 2 +- govtool/backend/vva-be.cabal | 2 +- govtool/frontend/package-lock.json | 4 ++-- govtool/frontend/package.json | 2 +- govtool/metadata-validation/package-lock.json | 4 ++-- govtool/metadata-validation/package.json | 2 +- govtool/metadata-validation/src/main.ts | 2 +- 9 files changed, 28 insertions(+), 10 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6d8376635..129713b4c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,6 +16,24 @@ changes. ### Fixed +- + +### Changed + +- + +### Removed + +- + +## [v2.0.9](https://github.com/IntersectMBO/govtool/releases/tag/v2.0.9) 2025-01-24 + +### Added + +- + +### Fixed + - Fix opening IPFS links [Issue 2711](https://github.com/IntersectMBO/govtool/issues/2711) ### Changed diff --git a/govtool/backend/Dockerfile b/govtool/backend/Dockerfile index 0ce34a2a9..f1a41e38f 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-2.0.8/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-2.0.9/x/vva-be/build/vva-be/vva-be /usr/local/bin diff --git a/govtool/backend/Dockerfile.qovery b/govtool/backend/Dockerfile.qovery index 9d5f95226..48c3d4037 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-2.0.8/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-2.0.9/x/vva-be/build/vva-be/vva-be /usr/local/bin # Expose the necessary port EXPOSE 9876 diff --git a/govtool/backend/vva-be.cabal b/govtool/backend/vva-be.cabal index a8b5cc157..2ed94683c 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: 2.0.8 +version: 2.0.9 -- A short (one-line) description of the package. -- synopsis: diff --git a/govtool/frontend/package-lock.json b/govtool/frontend/package-lock.json index 77f8eafac..09753d7f7 100644 --- a/govtool/frontend/package-lock.json +++ b/govtool/frontend/package-lock.json @@ -1,12 +1,12 @@ { "name": "@govtool/frontend", - "version": "2.0.8", + "version": "2.0.9", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@govtool/frontend", - "version": "2.0.8", + "version": "2.0.9", "hasInstallScript": true, "dependencies": { "@emotion/react": "^11.11.1", diff --git a/govtool/frontend/package.json b/govtool/frontend/package.json index 4b259ad40..885ae1240 100644 --- a/govtool/frontend/package.json +++ b/govtool/frontend/package.json @@ -1,7 +1,7 @@ { "name": "@govtool/frontend", "private": true, - "version": "2.0.8", + "version": "2.0.9", "type": "module", "scripts": { "build": "vite build", diff --git a/govtool/metadata-validation/package-lock.json b/govtool/metadata-validation/package-lock.json index fa84a6ce7..2b5aed462 100644 --- a/govtool/metadata-validation/package-lock.json +++ b/govtool/metadata-validation/package-lock.json @@ -1,12 +1,12 @@ { "name": "@govtool/metadata-validation", - "version": "2.0.8", + "version": "2.0.9", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@govtool/metadata-validation", - "version": "2.0.8", + "version": "2.0.9", "license": "UNLICENSED", "dependencies": { "@nestjs/axios": "^3.0.2", diff --git a/govtool/metadata-validation/package.json b/govtool/metadata-validation/package.json index f2056ea09..ca5bcc570 100644 --- a/govtool/metadata-validation/package.json +++ b/govtool/metadata-validation/package.json @@ -1,6 +1,6 @@ { "name": "@govtool/metadata-validation", - "version": "2.0.8", + "version": "2.0.9", "description": "", "author": "", "private": true, diff --git a/govtool/metadata-validation/src/main.ts b/govtool/metadata-validation/src/main.ts index e07b8cd42..965048559 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('2.0.8') + .setVersion('2.0.9') .build(); const document = SwaggerModule.createDocument(app, config);