Skip to content

Commit e83412d

Browse files
authored
Merge pull request #2612 from IntersectMBO/staging
GovTool - v2.0.4
2 parents 1b0d220 + 3ec92ed commit e83412d

33 files changed

+192
-105
lines changed

CHANGELOG.md

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

2727
-
2828

29+
## [v2.0.4](https://github.com/IntersectMBO/govtool/releases/tag/v2.0.4) 2025-01-07
30+
31+
### Added
32+
33+
-
34+
35+
### Fixed
36+
37+
- Fix CIP-129 DRep view identifier for script based DReps [Issue 2583](https://github.com/IntersectMBO/govtool/issues/2583)
38+
- Fix fetching metadata from IPFS gateway
39+
- Fix bad request on passing the random sorting to GA list request [Issue 2535](https://github.com/IntersectMBO/govtool/issues/2535)
40+
- Fix wrong drep activity conditions
41+
42+
### Changed
43+
44+
- Reduce CSL version to 12.1.1 [Issue 2600](https://github.com/IntersectMBO/govtool/issues/2600)
45+
46+
### Removed
47+
48+
-
49+
2950
## [v2.0.3](https://github.com/IntersectMBO/govtool/releases/tag/v2.0.3) 2024-12-30
3051

3152
### 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.3/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.4/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.3/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.4/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: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,24 @@ DRepActivity AS (
1717
ORDER BY
1818
epoch_no DESC
1919
LIMIT 1
20+
),
21+
LatestVotingProcedure AS (
22+
SELECT
23+
vp.*,
24+
ROW_NUMBER() OVER (PARTITION BY drep_voter ORDER BY tx_id DESC) AS rn
25+
FROM
26+
voting_procedure vp
27+
),
28+
LatestVoteEpoch AS (
29+
SELECT
30+
block.epoch_no,
31+
lvp.drep_voter as drep_id
32+
FROM
33+
LatestVotingProcedure lvp
34+
JOIN tx ON tx.id = lvp.tx_id
35+
JOIN block ON block.id = tx.block_id
36+
WHERE
37+
lvp.rn = 1
2038
)
2139
SELECT DISTINCT ON (dh.raw)
2240
encode(dh.raw, 'hex'),
@@ -26,7 +44,7 @@ SELECT DISTINCT ON (dh.raw)
2644
encode(va.data_hash, 'hex'),
2745
dr_deposit.deposit,
2846
DRepDistr.amount,
29-
(DRepActivity.epoch_no - newestRegister.epoch_no) <= DRepActivity.drep_activity AS active,
47+
(DRepActivity.epoch_no - GREATEST(MAX(COALESCE(block.epoch_no, block_first_register.epoch_no)), lve.epoch_no)) <= DRepActivity.drep_activity AS active,
3048
encode(dr_voting_anchor.tx_hash, 'hex') AS tx_hash,
3149
newestRegister.time AS last_register_time,
3250
COALESCE(latestDeposit.deposit, 0),
@@ -143,6 +161,7 @@ FROM
143161
) AS dr_first_register ON dr_first_register.drep_hash_id = dh.id AND dr_first_register.rn = 1
144162
LEFT JOIN tx AS tx_first_register ON tx_first_register.id = dr_first_register.tx_id
145163
LEFT JOIN block AS block_first_register ON block_first_register.id = tx_first_register.block_id
164+
LEFT JOIN LatestVoteEpoch lve ON lve.drep_id = dh.id
146165
WHERE
147166
(
148167
COALESCE(?, '') = '' OR
@@ -163,6 +182,7 @@ GROUP BY
163182
DRepDistr.amount,
164183
DRepActivity.epoch_no,
165184
DRepActivity.drep_activity,
185+
lve.epoch_no,
166186
dr_voting_anchor.tx_hash,
167187
newestRegister.time,
168188
newestRegister.epoch_no,

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.3
3+
version: 2.0.4
44

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

govtool/frontend/package-lock.json

Lines changed: 6 additions & 12 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: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@govtool/frontend",
33
"private": true,
4-
"version": "2.0.3",
4+
"version": "2.0.4",
55
"type": "module",
66
"scripts": {
77
"build": "vite build",
@@ -25,7 +25,7 @@
2525
"dependencies": {
2626
"@emotion/react": "^11.11.1",
2727
"@emotion/styled": "^11.11.0",
28-
"@emurgo/cardano-serialization-lib-asmjs": "^13.1.0",
28+
"@emurgo/cardano-serialization-lib-asmjs": "^12.1.1",
2929
"@hookform/resolvers": "^3.3.1",
3030
"@intersect.mbo/intersectmbo.org-icons-set": "^1.0.8",
3131
"@intersect.mbo/pdf-ui": "^0.5.5",
@@ -112,6 +112,5 @@
112112
"typescript": "^5.0.2",
113113
"nth-check": "^2.0.1",
114114
"postcss": "^8.4.31"
115-
},
116-
115+
}
117116
}

govtool/frontend/patches/@emurgo+cardano-serialization-lib-asmjs+13.2.0.patch renamed to govtool/frontend/patches/@emurgo+cardano-serialization-lib-asmjs+12.1.1.patch

File renamed without changes.

govtool/frontend/src/components/organisms/DRepCard.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ export const DRepCard = ({
3434
metadataStatus,
3535
image,
3636
drepId,
37+
isScriptBased,
3738
},
3839
isConnected,
3940
isDelegationLoading,
@@ -59,8 +60,8 @@ export const DRepCard = ({
5960
});
6061

6162
const cip129Identifier = encodeCIP129Identifier({
62-
txID: `22${drepId}`,
63-
bech32Prefix: "drep",
63+
txID: `${isScriptBased ? "23" : "22"}${drepId}`,
64+
bech32Prefix: isScriptBased ? "drep_script" : "drep",
6465
});
6566

6667
return (

govtool/frontend/src/components/organisms/DRepDetailsCard.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ export const DRepDetailsCard = ({
4747
view,
4848
drepId,
4949
votingPower,
50+
isScriptBased,
5051
} = dRepData;
5152

5253
const groupedReferences = references?.reduce<Record<string, Reference[]>>(
@@ -120,8 +121,8 @@ export const DRepDetailsCard = ({
120121
>
121122
<CopyableText
122123
value={encodeCIP129Identifier({
123-
txID: `22${drepId}`,
124-
bech32Prefix: "drep",
124+
txID: `${isScriptBased ? "23" : "22"}${drepId}`,
125+
bech32Prefix: isScriptBased ? "drep_script" : "drep",
125126
})}
126127
dataTestId="copy-cip-129-drep-id-button"
127128
/>

0 commit comments

Comments
 (0)