Skip to content

Commit

Permalink
[#] add tx hash into voted card
Browse files Browse the repository at this point in the history
  • Loading branch information
Sworzen1 committed Apr 10, 2024
1 parent 6f57da7 commit db059c3
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,11 @@ import { useTranslation } from "@hooks";
import { Vote } from "@models";

type Props = {
voteTxHash: string;
vote: Vote;
};

export const GovernanceActionCardMyVote = ({ vote }: Props) => {
export const GovernanceActionCardMyVote = ({ voteTxHash, vote }: Props) => {
const { t } = useTranslation();

return (
Expand Down Expand Up @@ -41,8 +42,7 @@ export const GovernanceActionCardMyVote = ({ vote }: Props) => {
</Box>
<Button
onClick={() =>
// TODO: Confirm/change the link
openInNewTab("https://adanordic.com/latest_transactions")
openInNewTab(`https://sancho.cexplorer.io/tx/${voteTxHash}`)
}
variant="text"
size="small"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ export const GovernanceVotedOnCard = ({ votedProposal, inProgress }: Props) => {
isCopyButton
isSliderCard
/>
<GovernanceActionCardMyVote vote={vote.vote} />
<GovernanceActionCardMyVote voteTxHash={vote.txHash} vote={vote.vote} />
</Box>
<Box
bgcolor="white"
Expand Down
13 changes: 7 additions & 6 deletions govtool/frontend/src/models/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export interface DRepData {
deposit: number;
votingPower: number;
status: DRepStatus;
type: 'DRep' | 'SoleVoter';
type: "DRep" | "SoleVoter";
}

export type Vote = "yes" | "no" | "abstain";
Expand All @@ -35,13 +35,14 @@ export type InfinityProposals = {
};

type ProposalVote = {
proposalId: string;
drepId: string;
vote: Vote;
url: string;
metadataHash: string;
date: string;
drepId: string;
epochNo: number;
metadataHash: string;
proposalId: string;
txHash: string;
url: string;
vote: Vote;
};

type ProposalData = {
Expand Down

0 comments on commit db059c3

Please sign in to comment.