Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,25 @@ changes.

-

## [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

- Change labelling of governance action metadata anchor
- Change labelling and order of new constitution governance action details

### Removed

-

## [v2.0.8](https://github.com/IntersectMBO/govtool/releases/tag/v2.0.8) 2025-01-23

### Added
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-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
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-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
Expand Down
35 changes: 23 additions & 12 deletions govtool/backend/sql/list-dreps.sql
Original file line number Diff line number Diff line change
Expand Up @@ -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
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: 2.0.8
version: 2.0.9

-- 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.

2 changes: 1 addition & 1 deletion govtool/frontend/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@govtool/frontend",
"private": true,
"version": "2.0.8",
"version": "2.0.9",
"type": "module",
"scripts": {
"build": "vite build",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,17 @@ export const GovernanceActionNewConstitutionDetailsTabContent = ({
return (
<Box>
<GovernanceActionCardElement
isCopyButton
label="Data Hash"
text={(details?.anchor as NewConstitutionAnchor)?.dataHash as string}
dataTestId="new-constitution-data-hash"
isLinkButton
label="New constitution link"
text={(details?.anchor as NewConstitutionAnchor)?.url as string}
dataTestId="new-constitution-url"
textVariant={screenWidth > 1600 ? "longText" : "oneLine"}
/>
<GovernanceActionCardElement
isCopyButton
label="New Constitution Link"
text={(details?.anchor as NewConstitutionAnchor)?.url as string}
dataTestId="new-constitution-url"
label="New constitution hash"
text={(details?.anchor as NewConstitutionAnchor)?.dataHash as string}
dataTestId="new-constitution-data-hash"
textVariant={screenWidth > 1600 ? "longText" : "oneLine"}
/>
</Box>
Expand Down
4 changes: 2 additions & 2 deletions govtool/frontend/src/i18n/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -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</0>\non {{date}} (Epoch {{epoch}})",
"castVoteDeadline": "You can change your vote up to {{date}} (Epoch {{epoch}})",
Expand Down
2 changes: 2 additions & 0 deletions govtool/frontend/src/utils/openInNewTab.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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");
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": "2.0.8",
"version": "2.0.9",
"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('2.0.8')
.setVersion('2.0.9')
.build();

const document = SwaggerModule.createDocument(app, config);
Expand Down