Skip to content

Commit

Permalink
declare _vote event argument as BigNumber (#355)
Browse files Browse the repository at this point in the history
  • Loading branch information
dkent600 authored Sep 18, 2018
1 parent 6dc6b6a commit d895b75
Show file tree
Hide file tree
Showing 4 changed files with 53 additions and 31 deletions.
7 changes: 4 additions & 3 deletions lib/wrappers/genesisProtocol.ts
Original file line number Diff line number Diff line change
Expand Up @@ -931,7 +931,6 @@ export class GenesisProtocolWrapper extends IntVoteInterfaceWrapper
currentBoostedVotePeriodLimit: proposalArray[9].toNumber(),
daoBountyRemain: proposalArray[11],
executable: proposalArray[2],
lostReputation: proposalArray[5],
numOfChoices: proposalArray[1].toNumber(),
paramsHash: proposalArray[10],
proposalId,
Expand Down Expand Up @@ -974,7 +973,10 @@ export interface StakeEventResult {
* indexed
*/
_proposalId: Hash;
_vote: number;
/**
* The choice of vote
*/
_vote: BigNumber;
/**
* indexed
*/
Expand Down Expand Up @@ -1343,7 +1345,6 @@ export interface GenesisProtocolProposal {
currentBoostedVotePeriodLimit: number;
daoBountyRemain: BigNumber;
executable: Address;
lostReputation: BigNumber;
numOfChoices: number;
paramsHash: Hash;
proposalId: Hash;
Expand Down
2 changes: 1 addition & 1 deletion lib/wrappers/iIntVoteInterface.ts
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ export interface VoteProposalEventResult {
/**
* The choice of vote
*/
_vote: number;
_vote: BigNumber;
/**
* indexed
*/
Expand Down
73 changes: 47 additions & 26 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion test/voteInOrganizationScheme.ts
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ describe("VoteInOrganizationScheme", () => {
/**
* expect a vote 'for'
*/
assert.equal(event.args._vote, 1);
assert.equal(event.args._vote.toNumber(), 1);
/**
* expect the vote to have been cast on behalf of the DAO
*/
Expand Down

0 comments on commit d895b75

Please sign in to comment.