Skip to content

Conversation

@chickick
Copy link
Collaborator

No description provided.

@cloudflare-workers-and-pages
Copy link

cloudflare-workers-and-pages bot commented Jul 24, 2025

Deploying validator-voting-ui with  Cloudflare Pages  Cloudflare Pages

Latest commit: ec17c86
Status: ✅  Deploy successful!
Preview URL: https://f834644c.validator-voting-ui.pages.dev
Branch Preview URL: https://feat-home-v2.validator-voting-ui.pages.dev

View logs

setTotalVotedStakeAmount(Big(data[1]));
setVotedYeaStakeAmount(Big(data[0]));
setVotedStakeAmount(Big(data[1]));
setTotalVotedStakeAmount(Big(data[2]));
Copy link
Contributor

Choose a reason for hiding this comment

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

This is the total stake amount, including what is not voted. I think totalStakeAmount will be more appropriate.

const aVote = a.vote === 'yes' ? votes[a.accountId] || '0' : a.totalStakedBalance;
const bVote = b.vote === 'yes' ? votes[b.accountId] || '0' : b.totalStakedBalance;
const aVote =
a.vote === 'yes'
Copy link
Contributor

Choose a reason for hiding this comment

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

For either yes or no vote, we can get the voted stake amount from votes[accountId][1] now, since contract tracks stake amount for both yes and no.

const currentProgressPercent = passed
? 100
: Math.round((votedPercentNum / targetPercent) * 100);
// const totalProgressPercentText = passed ? votedPercentNum : targetPercent;
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we need to remove the comment?

{targetPercent}%{targetBadge}
<div className="flex w-0.5 left-1/2 h-[24px] -top-[32px] -translate-x-1/2 bg-[hsla(0,0%,12%,0.08)] absolute"></div>
</div>
{/* <div className="absolute" style={{ right: '0' }}>
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we need to remove the comment?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants