Skip to content

Commit 9c2e740

Browse files
authored
Merge pull request #2352 from IntersectMBO/staging
GovTool - v1.0.26
2 parents 04b0045 + fbb49bc commit 9c2e740

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+1203
-994
lines changed

CHANGELOG.md

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

2727
-
2828

29+
## [v1.0.26](https://github.com/IntersectMBO/govtool/releases/tag/v1.0.26) 2024-11-07
30+
31+
### Added
32+
33+
- add support for CIP-129 governance identifiers [Issue 2183](https://github.com/IntersectMBO/govtool/issues/2183)
34+
- Add label to supporting links in Governance Action details [Issue 2305](https://github.com/IntersectMBO/govtool/issues/2305)
35+
36+
### Fixed
37+
38+
- Fix certificates order where vote delegation cert is before the DRep registration cert [Issue 2333](https://github.com/IntersectMBO/govtool/issues/2333)
39+
40+
### Changed
41+
42+
- Change multilanguage support to use json file [Issue 2325](https://github.com/IntersectMBO/govtool/issues/2325)
43+
- Display full Governance Action IDs on desktop
44+
- Support space on given name [Issue 2276](https://github.com/IntersectMBO/govtool/issues/2276)
45+
- Display ADA in 'en-US' format [Issue 2305](https://github.com/IntersectMBO/govtool/issues/2305)
46+
47+
### Removed
48+
49+
-
50+
2951
## [v1.0.25](https://github.com/IntersectMBO/govtool/releases/tag/v1.0.25) 2024-11-04
3052

3153
### 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-1.0.25/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-1.0.26/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-1.0.25/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-1.0.26/x/vva-be/build/vva-be/vva-be /usr/local/bin
88

99
# Expose the necessary port
1010
EXPOSE 9876

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: 1.0.25
3+
version: 1.0.26
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: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@govtool/frontend",
33
"private": true,
4-
"version": "1.0.25",
4+
"version": "1.0.26",
55
"type": "module",
66
"scripts": {
77
"build": "vite build",
@@ -109,5 +109,5 @@
109109
"typescript": "^5.0.2"
110110
},
111111
"readme": "ERROR: No README data found!",
112-
"_id": "[email protected].25"
112+
"_id": "[email protected].26"
113113
}

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

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ import {
1111

1212
import { useScreenDimension, useTranslation } from "@hooks";
1313
import {
14+
encodeCIP129Identifier,
1415
getFullGovActionId,
1516
getProposalTypeLabel,
1617
getProposalTypeNoEmptySpaces,
@@ -53,6 +54,11 @@ export const GovernanceActionCard: FC<ActionTypeProps> = ({ ...props }) => {
5354
const { t } = useTranslation();
5455

5556
const govActionId = getFullGovActionId(txHash, index);
57+
const cip129GovernanceActionId = encodeCIP129Identifier(
58+
txHash,
59+
index.toString(16).padStart(2, "0"),
60+
"gov_action",
61+
);
5662

5763
return (
5864
<Box
@@ -113,8 +119,15 @@ export const GovernanceActionCard: FC<ActionTypeProps> = ({ ...props }) => {
113119
/>
114120
<GovernanceActionCardElement
115121
label={t("govActions.governanceActionId")}
116-
text={getFullGovActionId(txHash, index)}
117-
dataTestId={`${getFullGovActionId(txHash, index)}-id`}
122+
text={govActionId}
123+
dataTestId={`${govActionId}-id`}
124+
isCopyButton
125+
isSliderCard
126+
/>
127+
<GovernanceActionCardElement
128+
label={t("govActions.cip129GovernanceActionId")}
129+
text={cip129GovernanceActionId}
130+
dataTestId={`${cip129GovernanceActionId}-id`}
118131
isCopyButton
119132
isSliderCard
120133
/>

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

Lines changed: 26 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import { LinkWithIcon } from "@molecules";
99
export const GovernanceActionDetailsCardLinks = ({
1010
links,
1111
}: {
12-
links?: string[];
12+
links?: Reference[];
1313
}) => {
1414
const { isMobile } = useScreenDimension();
1515
const { t } = useTranslation();
@@ -41,21 +41,31 @@ export const GovernanceActionDetailsCardLinks = ({
4141
rowGap: 2,
4242
}}
4343
>
44-
{links.map((link) => (
45-
<LinkWithIcon
46-
key={link}
47-
label={link}
48-
onClick={() => {
49-
openModal({
50-
type: "externalLink",
51-
state: {
52-
externalLink: link,
53-
},
54-
});
55-
}}
56-
icon={<img alt="link" src={ICONS.link} />}
57-
cutWithEllipsis
58-
/>
44+
{links.map(({ uri, label }) => (
45+
<Box flexDirection="column">
46+
{label && (
47+
<Typography
48+
data-testid={`${label}-${uri}-label`}
49+
sx={{ fontWeight: "500" }}
50+
>
51+
{label}
52+
</Typography>
53+
)}
54+
<LinkWithIcon
55+
key={uri}
56+
label={uri}
57+
onClick={() => {
58+
openModal({
59+
type: "externalLink",
60+
state: {
61+
externalLink: uri,
62+
},
63+
});
64+
}}
65+
icon={<img alt="link" src={ICONS.link} />}
66+
cutWithEllipsis
67+
/>
68+
</Box>
5969
))}
6070
</Box>
6171
</>

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

Lines changed: 19 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import { Button } from "@atoms";
55
import { PATHS } from "@consts";
66
import { useScreenDimension, useTranslation } from "@hooks";
77
import {
8+
encodeCIP129Identifier,
89
getFullGovActionId,
910
getProposalTypeLabel,
1011
getProposalTypeNoEmptySpaces,
@@ -43,6 +44,13 @@ export const GovernanceVotedOnCard = ({ votedProposal, inProgress }: Props) => {
4344
const { isMobile, screenWidth } = useScreenDimension();
4445
const { t } = useTranslation();
4546

47+
const govActionId = getFullGovActionId(txHash, index);
48+
const cip129GovernanceActionId = encodeCIP129Identifier(
49+
txHash,
50+
index.toString(16).padStart(2, "0"),
51+
"gov_action",
52+
);
53+
4654
return (
4755
<Box
4856
sx={{
@@ -101,8 +109,15 @@ export const GovernanceVotedOnCard = ({ votedProposal, inProgress }: Props) => {
101109
/>
102110
<GovernanceActionCardElement
103111
label={t("govActions.governanceActionId")}
104-
text={getFullGovActionId(txHash, index)}
105-
dataTestId={`${getFullGovActionId(txHash, index)}-id`}
112+
text={govActionId}
113+
dataTestId={`${govActionId}-id`}
114+
isCopyButton
115+
isSliderCard
116+
/>
117+
<GovernanceActionCardElement
118+
label={t("govActions.cip129GovernanceActionId")}
119+
text={cip129GovernanceActionId}
120+
dataTestId={`${cip129GovernanceActionId}-id`}
106121
isCopyButton
107122
isSliderCard
108123
/>
@@ -120,15 +135,12 @@ export const GovernanceVotedOnCard = ({ votedProposal, inProgress }: Props) => {
120135
>
121136
<Button
122137
disabled={inProgress}
123-
data-testid={`govaction-${getFullGovActionId(
124-
txHash,
125-
index,
126-
)}-change-your-vote`}
138+
data-testid={`govaction-${govActionId}-change-your-vote`}
127139
onClick={() =>
128140
navigate(
129141
PATHS.dashboardGovernanceActionsAction.replace(
130142
":proposalId",
131-
getFullGovActionId(txHash, index),
143+
govActionId,
132144
),
133145
{
134146
state: {

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

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { Box } from "@mui/material";
33
import { IMAGES } from "@consts";
44
import { Typography, VotePill } from "@atoms";
55
import { useTranslation } from "@hooks";
6-
import { correctAdaFormat } from "@utils";
6+
import { correctVoteAdaFormat } from "@utils";
77
import { SubmittedVotesData } from "@models";
88

99
type Props = {
@@ -148,9 +148,11 @@ const Vote = ({ type, vote, value }: VoteProps) => (
148148
sx={{
149149
fontSize: 16,
150150
wordBreak: "break-all",
151+
lineHeight: "24px",
152+
fontWeight: "500",
151153
}}
152154
>
153-
{type !== "ccCommittee" ? `₳ ${correctAdaFormat(value)}` : value}
155+
{type !== "ccCommittee" ? `₳ ${correctVoteAdaFormat(value)}` : value}
154156
</Typography>
155157
</Box>
156158
);

0 commit comments

Comments
 (0)