Skip to content

Commit 9e1651e

Browse files
authored
Merge pull request #3097 from IntersectMBO/develop
GovTool - v2.0.13
2 parents c9a9eee + ec4639a commit 9e1651e

File tree

17 files changed

+248
-173
lines changed

17 files changed

+248
-173
lines changed

CHANGELOG.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,25 @@ changes.
1010

1111
## [Unreleased]
1212

13+
### Added
14+
15+
### Fixed
16+
17+
### Changed
18+
19+
### Removed
20+
21+
## [v2.0.13](https://github.com/IntersectMBO/govtool/releases/tag/v2.0.13) 2025-02-27
22+
23+
1324
### Added
1425

1526
### Fixed
1627

1728
- Fix responsive error on menu [Issue 3055](https://github.com/IntersectMBO/govtool/issues/3055)
1829
- Fix wrong placement of nav items in disconnected menu [Issue 3057](https://github.com/IntersectMBO/govtool/issues/3057)
1930
- Fix missing subtraction withdrawals from ada holder balance [Issue 3061](https://github.com/IntersectMBO/govtool/issues/3061)
31+
- Fix displaying voting power on direct voter cards
2032

2133
### Changed
2234

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.12/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.13/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.12/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.13/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: 2.0.12
3+
version: 2.0.13
44

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

govtool/frontend/package-lock.json

Lines changed: 6 additions & 6 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": "2.0.12",
4+
"version": "2.0.13",
55
"type": "module",
66
"scripts": {
77
"build": "vite build",
@@ -27,7 +27,7 @@
2727
"@emotion/styled": "^11.11.0",
2828
"@emurgo/cardano-serialization-lib-asmjs": "^12.1.1",
2929
"@hookform/resolvers": "^3.3.1",
30-
"@intersect.mbo/govtool-outcomes-pillar-ui": "1.2.3",
30+
"@intersect.mbo/govtool-outcomes-pillar-ui": "1.2.4",
3131
"@intersect.mbo/intersectmbo.org-icons-set": "^1.0.8",
3232
"@intersect.mbo/pdf-ui": "0.6.4",
3333
"@mui/icons-material": "^5.14.3",

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ export const DashboardCards = () => {
7171
<DirectVoterDashboardCard
7272
pendingTransaction={pendingTransaction}
7373
voter={voter}
74-
votingPower={votingPower}
74+
votingPower={voter.votingPower}
7575
/>
7676
<ListGovActionsDashboardCards />
7777
<ProposeGovActionDashboardCard

govtool/frontend/src/components/organisms/DashboardCards/DirectVoterDashboardCard.tsx

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import { LINKS } from "@/consts/links";
1313
type DirectVoterDashboardCardProps = {
1414
pendingTransaction: PendingTransaction;
1515
voter: VoterInfo;
16-
votingPower: number;
16+
votingPower: number | null;
1717
};
1818

1919
export const DirectVoterDashboardCard = ({
@@ -24,7 +24,7 @@ export const DirectVoterDashboardCard = ({
2424
const navigate = useNavigate();
2525
const { t } = useTranslation();
2626

27-
const ada = correctVoteAdaFormat(votingPower);
27+
const ada = correctVoteAdaFormat(votingPower ?? 0);
2828

2929
// learn more button
3030
const learnMoreButton: LoadingButtonProps = {
@@ -69,11 +69,13 @@ export const DirectVoterDashboardCard = ({
6969
},
7070
{ ...learnMoreButton, variant: "text" },
7171
],
72-
description: (
72+
description: votingPower ? (
7373
<Trans
7474
i18nKey="dashboard.cards.directVoter.isRegisteredDescription"
7575
values={{ votingPower: ada }}
7676
/>
77+
) : (
78+
<Trans i18nKey="dashboard.cards.directVoter.isRegisteredDescriptionWithoutVotingPower" />
7779
),
7880
state: "active",
7981
transactionId: voter?.soleVoterRegisterTxHash,

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,7 @@
8989
},
9090
"directVoter": {
9191
"isRegisteredDescription": "Your Voting Power of ₳<strong>{{votingPower}}</strong> can be used to vote.",
92+
"isRegisteredDescriptionWithoutVotingPower": "You can vote on Governance Actions.",
9293
"register": "Register",
9394
"registerDescription": "Register to Vote on Governance Actions.",
9495
"registerTitle": "Become a Direct Voter",

govtool/frontend/src/pages/RegisterAsDirectVoter.tsx

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,12 @@ import {
1313
useWalletErrorModal,
1414
} from "@hooks";
1515
import { CenteredBoxBottomButtons, CenteredBoxPageWrapper } from "@molecules";
16-
import { checkIsWalletConnected, openInNewTab } from "@utils";
16+
import { checkIsWalletConnected, correctAdaFormat, openInNewTab } from "@utils";
1717
import { WrongRouteInfo } from "@organisms";
1818
import { CertificatesBuilder } from "@emurgo/cardano-serialization-lib-asmjs";
1919

2020
export const RegisterAsDirectVoter = () => {
21-
const { cExplorerBaseUrl } = useAppContext();
21+
const { cExplorerBaseUrl, epochParams } = useAppContext();
2222
const navigate = useNavigate();
2323
const [isLoading, setIsLoading] = useState(false);
2424
const { t } = useTranslation();
@@ -148,6 +148,10 @@ export const RegisterAsDirectVoter = () => {
148148
key="0"
149149
/>,
150150
]}
151+
values={{
152+
deposit:
153+
correctAdaFormat(epochParams?.drep_deposit ?? undefined) ?? 500,
154+
}}
151155
/>
152156
</Typography>
153157
<CenteredBoxBottomButtons

0 commit comments

Comments
 (0)