Skip to content
Merged
Changes from all commits
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
17 changes: 6 additions & 11 deletions components/TransactionsList/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import EthAddressBadge from "@components/EthAddressBadge";
import Table from "@components/Table";
import TransactionBadge from "@components/TransactionBadge";
import { parseProposalText } from "@lib/api/treasury";
import { VOTING_SUPPORT_MAP } from "@lib/api/types/votes";
import { POLL_VOTES, VOTING_SUPPORT_MAP } from "@lib/api/types/votes";
import dayjs from "@lib/dayjs";
import { Badge, Box, Flex, Link as A, Text } from "@livepeer/design-system";
import { EventsQueryResult, TreasuryProposal } from "apollo";
Expand Down Expand Up @@ -344,24 +344,19 @@ const TransactionsList = ({
event?.param ?? "unknown"
}, has been updated`}</Box>
);
case "VoteEvent":
case "VoteEvent": {
const vote = POLL_VOTES[event?.choiceID];
return (
<Box>
{`Voted `}
<Badge
css={{
backgroundColor:
+event?.choiceID === 0 ? "$grass3" : "$tomato9",
color: +event?.choiceID === 0 ? "$grass11" : "$tomato11",
}}
size="1"
>
{+event?.choiceID === 0 ? '"For"' : '"Against"'}
<Badge css={vote.style} size="1">
{`"${vote.text}"`}
</Badge>
{` on a proposal`}
{renderEmoji("👩‍⚖️")}
</Box>
);
}
case "PollCreatedEvent":
return (
<Box>
Expand Down