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

Commit

Permalink
fix bug in max rounds reached case
Browse files Browse the repository at this point in the history
  • Loading branch information
tyler17 committed May 11, 2020
1 parent e0a5350 commit f3920c3
Showing 1 changed file with 3 additions and 2 deletions.
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 f3920c3

Please sign in to comment.