Skip to content

Commit

Permalink
Merge pull request #13 from allinbits/fix/pass-calculation
Browse files Browse the repository at this point in the history
fix: Pass perc calculation
  • Loading branch information
clockworkgr authored Dec 16, 2024
2 parents d390a5f + 677b5bc commit 3985c3e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
10 changes: 7 additions & 3 deletions src/components/proposals/ProposalWrapper.vue
Original file line number Diff line number Diff line change
Expand Up @@ -303,10 +303,14 @@ const expectedResult = computed(() => {
if (turnout.value < quorum.value) {
return false;
} else {
if (yes.value > threshold.value) {
return true;
} else {
if (yes.value == 0) {
return false;
} else {
if (yes.value / (yes.value + no.value) > threshold.value) {
return true;
} else {
return false;
}
}
}
});
Expand Down
2 changes: 1 addition & 1 deletion src/gql/index.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
export * from "./fragment-masking";
export * from "./gql";
export * from "./gql";

0 comments on commit 3985c3e

Please sign in to comment.