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

Commit

Permalink
add tracksTransaction to createPoll
Browse files Browse the repository at this point in the history
tyler17 committed May 28, 2021

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
1 parent 458321c commit 7ac1e9d
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions packages/dai-plugin-governance/src/GovPollingService.js
Original file line number Diff line number Diff line change
@@ -3,6 +3,7 @@ import { POLLING, BATCH_POLLING } from './utils/constants';
import { MKR } from './utils/constants';
import { fromBuffer, toBuffer, paddedArray } from './utils/helpers';
import { rankedChoiceIRV } from './utils/irv';
import tracksTransactions from './utils/tracksTransactions';

const POSTGRES_MAX_INT = 2147483647;

@@ -17,12 +18,14 @@ export default class GovPollingService extends PrivateService {
]);
}

async createPoll(startDate, endDate, multiHash, url) {
@tracksTransactions
async createPoll(startDate, endDate, multiHash, url, { promise }) {
const txo = await this._pollingContract().createPoll(
startDate,
endDate,
multiHash,
url
url,
{ promise }
);
const pollId = parseInt(txo.receipt.logs[0].topics[2]);
return pollId;

0 comments on commit 7ac1e9d

Please sign in to comment.