diff --git a/packages/dai-plugin-governance/package.json b/packages/dai-plugin-governance/package.json index ec9f26eff..cda7ad690 100644 --- a/packages/dai-plugin-governance/package.json +++ b/packages/dai-plugin-governance/package.json @@ -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", diff --git a/packages/dai-plugin-governance/src/GovPollingService.js b/packages/dai-plugin-governance/src/GovPollingService.js index 5b7690b14..54728be66 100644 --- a/packages/dai-plugin-governance/src/GovPollingService.js +++ b/packages/dai-plugin-governance/src/GovPollingService.js @@ -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;