Skip to content

Commit

Permalink
Merge pull request #1901 from IntersectMBO/fix/1887-replace-mocked-mr…
Browse files Browse the repository at this point in the history
…drep-with-cip-119-compliant-drep-given-name

fix(#1887): replace mocked MrDRep with CIP-119 compliant metadata
  • Loading branch information
MSzalowski authored Sep 2, 2024
2 parents b8c99e3 + db8dbec commit 7fa2053
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 7 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ changes.
- Bump @intersect.mbo/pdf-ui to v0.3.8
- Change logo to Cardano GovTool [Issue 1851](https://github.com/IntersectMBO/govtool/issues/1851)
- Change copy to Cardano GovTool [Issue 1852](https://github.com/IntersectMBO/govtool/issues/1852)
- Replace mocked MrDRep label in DRep retired card with given name if exists, or make the description more neutral if the given name is not provided [Issue 1887](https://github.com/IntersectMBO/govtool/issues/1887)

## [sancho-v1.0.14](https://github.com/IntersectMBO/govtool/releases/tag/sancho-v1.0.14) 2024-08-26

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,12 @@ export const DRepDashboardCard = ({
if (voter?.wasRegisteredAsDRep) {
return {
buttons: wasRegisteredOrNotRegisteredButtons,
description: (
description: voter?.givenName ? (
<Trans
i18nKey="dashboard.cards.drep.notRegisteredWasRegisteredDescriptionWithGivenName"
values={{ name: voter?.givenName }}
/>
) : (
<Trans i18nKey="dashboard.cards.drep.notRegisteredWasRegisteredDescription" />
),
transactionId: voter?.dRepRetireTxHash,
Expand Down
4 changes: 3 additions & 1 deletion govtool/frontend/src/i18n/locales/en.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,10 @@ export const en = {
notRegisteredDescription:
"Accept delegated voting power from other ADA holders, and combine it with your own voting power. Vote with the accumulated Power on Governance Actions.",
notRegisteredTitle: "Become a DRep",
notRegisteredWasRegisteredDescriptionWithGivenName:
"You are now retired and your listing in the DRep directory as <strong>{{givenName}}</strong> has been marked as <strong><i>retired</i></strong>. You cannot vote on Governance Actions as <strong>{{givenName}}</strong>.\n\nYou can always re-register as a DRep, in which case you will have the same DRep ID as you had initially.",
notRegisteredWasRegisteredDescription:
"You are now retired and your listing in the DRep directory as <strong>MrDRep</strong> has been marked as <strong><i>retired</i></strong>. You cannot vote on Governance Actions as <strong>MrDRep</strong>.\n\nYou can always re-register as a DRep, in which case you will have the same DRep ID as you had initially.",
"You are now retired and your listing in the DRep directory has been marked as <strong><i>retired</i></strong>. You cannot vote on Governance Actions.\n\nYou can always re-register as a DRep, in which case you will have the same DRep ID as you had initially.",
notRegisteredWasRegisteredTitle: "You Have Retired as a DRep.",
register: "Register",
registerAgain: "Register Again as a dRep",
Expand Down
19 changes: 14 additions & 5 deletions govtool/frontend/src/models/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,15 +74,24 @@ export type NetworkMetrics = {
};

export type VoterInfo = {
isRegisteredAsDRep: boolean;
wasRegisteredAsDRep: boolean;
isRegisteredAsSoleVoter: boolean;
wasRegisteredAsSoleVoter: boolean;
deposit: number;
dRepRegisterTxHash: string | null;
dRepRetireTxHash: string | null;
deposit: number;
givenName: string | null;
imageHash: string | null;
imageUrl: string | null;
isRegisteredAsDRep: boolean;
isRegisteredAsSoleVoter: boolean;
motivations: string | null;
objectives: string | null;
paymentAddress: string | null;
qualifications: string | null;
soleVoterRegisterTxHash: string | null;
soleVoterRetireTxHash: string | null;
url: string | null;
votingPower: number | null;
wasRegisteredAsDRep: boolean;
wasRegisteredAsSoleVoter: boolean;
};

export enum DRepStatus {
Expand Down

0 comments on commit 7fa2053

Please sign in to comment.