From ae4d415eb62d6c31461bac9b69c2c69bda9c077b Mon Sep 17 00:00:00 2001 From: MrX-SNX Date: Mon, 16 Sep 2024 14:09:15 +0100 Subject: [PATCH] fix: decimals (#458) --- governance/ui/src/components/UserTableView/UserTableView.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/governance/ui/src/components/UserTableView/UserTableView.tsx b/governance/ui/src/components/UserTableView/UserTableView.tsx index 05ec18d8f..e78b9de0c 100644 --- a/governance/ui/src/components/UserTableView/UserTableView.tsx +++ b/governance/ui/src/components/UserTableView/UserTableView.tsx @@ -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 ( @@ -122,7 +122,7 @@ export default function UserTableView({ {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')) : '—'}