Skip to content

Commit

Permalink
Merge pull request #498 from DemocracyEarth/fortmatic
Browse files Browse the repository at this point in the history
Quick bug fix.
  • Loading branch information
santisiri authored Feb 10, 2020
2 parents f7821ac + ab03a0b commit e7cf579
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions lib/web3.js
Original file line number Diff line number Diff line change
Expand Up @@ -286,18 +286,17 @@ const _mirrorTransaction = (event, collectiveId, block) => {
const authorUsername = _getUserAddress(event, collectiveId, 'MEMBER');
const user = Meteor.users.findOne({ username: authorUsername });
const index = new BigNumber(event.returnValues.proposalIndex).toString();

log(`[web3] Mirroring blockchain event as transaction action with index: ${index}...`);

if (user) {
const contract = Contracts.findOne({ importId: index });
if (contract) {
let poll;
switch (event.returnValues.uintVote) {
case 1: // yes
case '1': // yes
poll = Contracts.findOne({ keyword: `${contract.keyword}/yes` });
break;
case 2: // no
case '2': // no
poll = Contracts.findOne({ keyword: `${contract.keyword}/no` });
break;
default:
Expand Down

0 comments on commit e7cf579

Please sign in to comment.