Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[#904] No option to delegate to myself as a drep #965

Merged
Show file tree
Hide file tree
Changes from 1 commit
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
5 changes: 3 additions & 2 deletions govtool/frontend/src/components/organisms/DRepCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,9 @@ export const DRepCard = ({
}}
>
<Box minWidth={0} display="flex" flexDirection="column">
<Typography sx={ellipsisStyles}>{type}</Typography>
<Typography sx={ellipsisStyles}>
{type === "SoleVoter" ? t("dRepDirectory.directVoter") : type}
</Typography>
<ButtonBase
data-testid={`${view}-copy-id-button`}
onClick={(e) => {
Expand Down Expand Up @@ -177,7 +179,6 @@ export const DRepCard = ({
{status === "Active" &&
isConnected &&
onDelegate &&
!isMe &&
!isInProgress && (
<Button
data-testid={`${view}-delegate-button`}
Expand Down
3 changes: 3 additions & 0 deletions govtool/frontend/src/i18n/locales/en.ts
Original file line number Diff line number Diff line change
Expand Up @@ -250,9 +250,12 @@ export const en = {
automatedVotingOptions: "Automated Voting Options",
editBtn: "Edit DRep data",
delegationOptions: "Delegation Options",
directVoter: "Direct Voter",
filterTitle: "DRep Status",
meAsDRep: "This DRep ID is connected to your wallet",
myDelegation: "You have delegated <strong>₳ {{ada}}</strong> to:",
myDelegationToYourself:
"You have delegated <strong>₳ {{ada}}</strong> to yourself:",
myDRep: "This is your DRep",
listTitle: "Find a DRep",
noConfidenceDescription:
Expand Down
2 changes: 1 addition & 1 deletion govtool/frontend/src/models/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export interface DRepData {
deposit: number;
votingPower: number;
status: DRepStatus;
type: "DRep" | "DirectVoter";
type: "DRep" | "SoleVoter";
}
export type InfinityDRepData = {
elements: DRepData[];
Expand Down
1 change: 1 addition & 0 deletions govtool/frontend/src/pages/DRepDirectoryContent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ export const DRepDirectoryContent: FC<DRepDirectoryContentProps> = ({
dRep={myDrep}
isConnected={!!isConnected}
isInProgress={isSameDRep(myDrep, inProgressDelegation)}
isMe={isSameDRep(myDrep, myDRepId)}
/>
</div>
)}
Expand Down
Loading