Skip to content

Commit d45c8ce

Browse files
authored
Merge pull request #2731 from IntersectMBO/staging
GovTool - v2.0.9
2 parents 80bdb8d + efa13e8 commit d45c8ce

File tree

13 files changed

+63
-31
lines changed

13 files changed

+63
-31
lines changed

CHANGELOG.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,25 @@ changes.
2626

2727
-
2828

29+
## [v2.0.9](https://github.com/IntersectMBO/govtool/releases/tag/v2.0.9) 2025-01-24
30+
31+
### Added
32+
33+
-
34+
35+
### Fixed
36+
37+
- Fix opening IPFS links [Issue 2711](https://github.com/IntersectMBO/govtool/issues/2711)
38+
39+
### Changed
40+
41+
- Change labelling of governance action metadata anchor
42+
- Change labelling and order of new constitution governance action details
43+
44+
### Removed
45+
46+
-
47+
2948
## [v2.0.8](https://github.com/IntersectMBO/govtool/releases/tag/v2.0.8) 2025-01-23
3049

3150
### Added

govtool/backend/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@ FROM $BASE_IMAGE_REPO:$BASE_IMAGE_TAG
44
WORKDIR /src
55
COPY . .
66
RUN cabal build
7-
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
7+
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

govtool/backend/Dockerfile.qovery

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ FROM $BASE_IMAGE_REPO:$BASE_IMAGE_TAG
44
WORKDIR /src
55
COPY . .
66
RUN cabal build
7-
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
7+
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
88

99
# Expose the necessary port
1010
EXPOSE 9876

govtool/backend/sql/list-dreps.sql

Lines changed: 23 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -67,19 +67,30 @@ FetchError AS (
6767
),
6868
LatestExistingVotingAnchor AS (
6969
SELECT
70-
dr.id AS drep_registration_id,
71-
dr.drep_hash_id,
72-
va.id AS voting_anchor_id,
73-
va.url,
74-
encode(va.data_hash, 'hex') AS metadata_hash
75-
FROM
76-
drep_registration dr
77-
JOIN voting_anchor va ON dr.voting_anchor_id = va.id
78-
JOIN off_chain_vote_data ocvd ON va.id = ocvd.voting_anchor_id
70+
subquery.drep_registration_id,
71+
subquery.drep_hash_id,
72+
subquery.voting_anchor_id,
73+
subquery.url,
74+
subquery.metadata_hash,
75+
subquery.ocvd_id
76+
FROM (
77+
SELECT
78+
dr.id AS drep_registration_id,
79+
dr.drep_hash_id,
80+
va.id AS voting_anchor_id,
81+
va.url,
82+
encode(va.data_hash, 'hex') AS metadata_hash,
83+
ocvd.id AS ocvd_id,
84+
ROW_NUMBER() OVER (PARTITION BY dr.drep_hash_id ORDER BY dr.tx_id DESC) AS rn
85+
FROM
86+
drep_registration dr
87+
JOIN voting_anchor va ON dr.voting_anchor_id = va.id
88+
JOIN off_chain_vote_data ocvd ON va.id = ocvd.voting_anchor_id
89+
WHERE
90+
ocvd.voting_anchor_id IS NOT NULL
91+
) subquery
7992
WHERE
80-
ocvd.voting_anchor_id IS NOT NULL
81-
ORDER BY
82-
dr.tx_id DESC
93+
subquery.rn = 1
8394
),
8495
HasNonDeregisterVotingAnchor AS (
8596
SELECT

govtool/backend/vva-be.cabal

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
cabal-version: 3.6
22
name: vva-be
3-
version: 2.0.8
3+
version: 2.0.9
44

55
-- A short (one-line) description of the package.
66
-- synopsis:

govtool/frontend/package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

govtool/frontend/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@govtool/frontend",
33
"private": true,
4-
"version": "2.0.8",
4+
"version": "2.0.9",
55
"type": "module",
66
"scripts": {
77
"build": "vite build",

govtool/frontend/src/components/molecules/GovernanceActionNewConstitutionDetailsTabContent.tsx

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,17 +12,17 @@ export const GovernanceActionNewConstitutionDetailsTabContent = ({
1212
return (
1313
<Box>
1414
<GovernanceActionCardElement
15-
isCopyButton
16-
label="Data Hash"
17-
text={(details?.anchor as NewConstitutionAnchor)?.dataHash as string}
18-
dataTestId="new-constitution-data-hash"
15+
isLinkButton
16+
label="New constitution link"
17+
text={(details?.anchor as NewConstitutionAnchor)?.url as string}
18+
dataTestId="new-constitution-url"
1919
textVariant={screenWidth > 1600 ? "longText" : "oneLine"}
2020
/>
2121
<GovernanceActionCardElement
2222
isCopyButton
23-
label="New Constitution Link"
24-
text={(details?.anchor as NewConstitutionAnchor)?.url as string}
25-
dataTestId="new-constitution-url"
23+
label="New constitution hash"
24+
text={(details?.anchor as NewConstitutionAnchor)?.dataHash as string}
25+
dataTestId="new-constitution-data-hash"
2626
textVariant={screenWidth > 1600 ? "longText" : "oneLine"}
2727
/>
2828
</Box>

govtool/frontend/src/i18n/locales/en.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -344,8 +344,8 @@
344344
"about": "About",
345345
"abstract": "Abstract",
346346
"amount": "Amount:",
347-
"anchorURL": "Anchor URL",
348-
"anchorHash": "Anchor Hash",
347+
"anchorURL": "Metadata anchor link",
348+
"anchorHash": "Metadata anchor hash",
349349
"backToGovActions": "Back to Governance Actions",
350350
"castVote": "<0>You voted {{vote}} on this proposal</0>\non {{date}} (Epoch {{epoch}})",
351351
"castVoteDeadline": "You can change your vote up to {{date}} (Epoch {{epoch}})",

govtool/frontend/src/utils/openInNewTab.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ export const openInNewTab = (url: string) => {
33
const fullUrl =
44
url.startsWith("http://") || url.startsWith("https://")
55
? url
6+
: url.startsWith("ipfs")
7+
? `${process.env.VITE_IPFS_GATEWAY}/${url.slice(7)}`
68
: `https://${url}`;
79

810
const newWindow = window.open(fullUrl, "_blank", "noopener,noreferrer");

0 commit comments

Comments
 (0)