Skip to content

Commit

Permalink
🩹 governance: fix tick on revoke
Browse files Browse the repository at this point in the history
  • Loading branch information
JuampiRombola committed Sep 28, 2023
1 parent 9a43af7 commit 980b15e
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions components/governance/Delegation/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ const Delegation = () => {

const delegatedToYou = useMemo(() => {
if (votingPower === undefined || yourVotes === undefined) return undefined;
return delegate === zeroAddress ? votingPower - yourVotes : votingPower;
return delegate === zeroAddress && votingPower - yourVotes > 0 ? votingPower - yourVotes : votingPower;
}, [delegate, votingPower, yourVotes]);

if (isLoadingDelegate) {
Expand Down Expand Up @@ -131,7 +131,9 @@ const Delegation = () => {
<Box display="flex" flexDirection="column" gap={2}>
<Box display="flex" justifyContent="space-between" alignItems="center">
<Typography>{t('Delegated to you')}</Typography>
<Typography>{delegatedToYou === 0 ? 0 : formatNumber(delegatedToYou, 'USD', true)}</Typography>
<Typography fontWeight={600}>
{delegatedToYou === 0 ? 0 : formatNumber(delegatedToYou, 'USD', true)}
</Typography>
</Box>
<Box display="flex" justifyContent="space-between" alignItems="center" gap={2}>
{delegate === zeroAddress ? (
Expand All @@ -147,7 +149,7 @@ const Delegation = () => {
</Box>
</Box>
)}
<Typography>{yourVotes === 0 ? 0 : formatNumber(yourVotes, 'USD', true)}</Typography>
<Typography fontWeight={600}>{yourVotes === 0 ? 0 : formatNumber(yourVotes, 'USD', true)}</Typography>
</Box>
</Box>
)
Expand Down

1 comment on commit 980b15e

@vercel
Copy link

@vercel vercel bot commented on 980b15e Sep 28, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

app – ./

app-git-main.exactly.app
exactly.app
app.exactly.app
exactly-development.vercel.app
app.exact.ly

Please sign in to comment.