diff --git a/src/components/proposals/ProposalCard.tsx b/src/components/proposals/ProposalCard.tsx
index 23f598f7..e37b33d0 100644
--- a/src/components/proposals/ProposalCard.tsx
+++ b/src/components/proposals/ProposalCard.tsx
@@ -101,7 +101,7 @@ export default function ProposalCard({
const quorumPercentage = safeNumberFromBigInt(proposal.voting_quorum);
const thresholdPercentage = safeNumberFromBigInt(proposal.voting_threshold);
- // Calculate if requirements are met
+ // Calculate if requirements are met (using exact floating point comparison)
const metQuorum = calculations.participationRate >= quorumPercentage;
const metThreshold =
calculations.totalVotes > 0
@@ -125,7 +125,7 @@ export default function ProposalCard({
}
if (isActive) {
- return percentage !== undefined ? `${percentage.toFixed(1)}%` : "0%";
+ return percentage !== undefined ? `${percentage.toFixed(4)}%` : "0%";
}
return met ? "Passed" : "Failed";
diff --git a/src/components/proposals/ProposalHeader.tsx b/src/components/proposals/ProposalHeader.tsx
index 63614d31..bf88654a 100644
--- a/src/components/proposals/ProposalHeader.tsx
+++ b/src/components/proposals/ProposalHeader.tsx
@@ -51,7 +51,7 @@ export function ProposalHeader({ proposal }: ProposalHeaderProps) {
const quorumPercentage = safeNumberFromBigInt(proposal.voting_quorum);
const thresholdPercentage = safeNumberFromBigInt(proposal.voting_threshold);
- // Calculate if requirements are met
+ // Calculate if requirements are met (using exact floating point comparison)
const metQuorum = calculations.participationRate >= quorumPercentage;
const metThreshold =
calculations.totalVotes > 0
@@ -70,7 +70,7 @@ export function ProposalHeader({ proposal }: ProposalHeaderProps) {
// Helper function to get status text
const getStatusText = (isMet: boolean, percentage: number) => {
if (isMet) return "Passed";
- return `${percentage.toFixed(1)}%`;
+ return `${percentage.toFixed(4)}%`;
};
// Get DAO/token image - prioritize token image, fallback to DAO image if available
diff --git a/src/components/proposals/VotesTable.tsx b/src/components/proposals/VotesTable.tsx
index c3c35108..da323d62 100644
--- a/src/components/proposals/VotesTable.tsx
+++ b/src/components/proposals/VotesTable.tsx
@@ -72,7 +72,7 @@ const VotesTable = ({ proposalId, limit }: VotesTableProps) => {
return (