Skip to content

Commit

Permalink
fix: decimals (#458)
Browse files Browse the repository at this point in the history
  • Loading branch information
MrX-SNX authored Sep 16, 2024
1 parent 29ba630 commit ae4d415
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions governance/ui/src/components/UserTableView/UserTableView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ export default function UserTableView({
councilPeriod === '2' || councilPeriod === '0' || councilPeriod === '3';
const totalVotingPowerPercentage =
totalVotingPower && user.voteResult
? formatNumber(user.voteResult?.votePower.mul(100).div(totalVotingPower).toString())
? formatNumber(user.voteResult?.votePower.mul(10000).div(totalVotingPower).toNumber() / 100)
: 'N/A';

return (
Expand Down Expand Up @@ -122,7 +122,7 @@ export default function UserTableView({
<Text color="gray.500" fontSize="x-small">
{totalVotingPowerPercentage && user.voteResult
? activeCouncil === 'ambassador'
? formatNumber(user.voteResult.votePower.toString())
? formatNumber(utils.formatUnits(user.voteResult.votePower || '0', 'gwei'))
: formatNumber(utils.formatEther(user.voteResult.votePower || '0'))
: '—'}
</Text>
Expand Down

0 comments on commit ae4d415

Please sign in to comment.