From 38f50092d414846dcd0a2a42778af1c62aede803 Mon Sep 17 00:00:00 2001 From: cryptoseneca <85328329+cryptoseneca@users.noreply.github.com> Date: Thu, 11 Jan 2024 16:18:45 -0500 Subject: [PATCH] hot fix --- .../src/components/VoteConfirmationModal/index.tsx | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/packages/prop-house-webapp/src/components/VoteConfirmationModal/index.tsx b/packages/prop-house-webapp/src/components/VoteConfirmationModal/index.tsx index 63db0cd0d..0e5648e81 100644 --- a/packages/prop-house-webapp/src/components/VoteConfirmationModal/index.tsx +++ b/packages/prop-house-webapp/src/components/VoteConfirmationModal/index.tsx @@ -52,10 +52,15 @@ const VoteConfirmationModal: React.FC<{ const votes = voteAllotments .filter(a => a.votes > 0) .map(a => { - const factor = BigNumber.from(10).pow(GOV_POWER_OVERRIDES[round.address].decimals); - let votes = GOV_POWER_OVERRIDES[round.address] - ? BigNumber.from(a.votes).mul(factor).toString() - : String(a.votes); + let votes; + + if (GOV_POWER_OVERRIDES[round.address]) { + const factor = BigNumber.from(10).pow(GOV_POWER_OVERRIDES[round.address].decimals); + votes = BigNumber.from(a.votes).mul(factor).toString(); + } else { + votes = String(a.votes); + } + return { proposalId: a.proposalId, votingPower: votes }; });