Skip to content
This repository has been archived by the owner on Sep 28, 2022. It is now read-only.

Commit

Permalink
Merge branch 'ranked-choice-methods' of https://github.com/makerdao/d…
Browse files Browse the repository at this point in the history
…ai.js into ranked-choice-methods
  • Loading branch information
jparklev committed May 11, 2020
2 parents 40f6b56 + 99a7797 commit 678aeac
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion packages/dai-plugin-governance/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@makerdao/dai-plugin-governance",
"description": "A dai.js plugin for adding MKR governance support to dapps.",
"version": "0.12.0",
"version": "0.12.1",
"license": "MIT",
"repository": {
"type": "git",
Expand Down
5 changes: 3 additions & 2 deletions packages/dai-plugin-governance/src/GovPollingService.js
Original file line number Diff line number Diff line change
Expand Up @@ -214,9 +214,10 @@ export default class GovPollingService extends PrivateService {
let maxOption;
Object.entries(tally.options).forEach(
([option, { firstChoice, transfer }]) => {
if (firstChoice.plus(transfer).gt(max))
if (firstChoice.plus(transfer).gt(max)) {
max = firstChoice.plus(transfer);
maxOption = option;
maxOption = option;
}
}
);
tally.winner = maxOption;
Expand Down

0 comments on commit 678aeac

Please sign in to comment.