Skip to content
This repository has been archived by the owner on Jun 7, 2019. It is now read-only.

Commit

Permalink
Merge pull request #1202 from LiskHQ/1201-remove_requirement_for_reci…
Browse files Browse the repository at this point in the history
…pient_public_key

Remove the requirement for recipient_public_key property for vote transaction
  • Loading branch information
shuse2 committed Mar 28, 2019
2 parents 8ce171a + c9eb711 commit 262f5ff
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 22 deletions.
10 changes: 0 additions & 10 deletions packages/lisk-transactions/src/3_vote_transaction.ts
Original file line number Diff line number Diff line change
Expand Up @@ -202,16 +202,6 @@ export class VoteTransaction extends BaseTransaction {
);
}

if (!this.recipientPublicKey) {
errors.push(
new TransactionError(
'RecipientPublicKey must be set for vote transaction',
this.id,
'.recipientPublicKey',
),
);
}

return errors;
}

Expand Down
12 changes: 0 additions & 12 deletions packages/lisk-transactions/test/3_vote_transaction.ts
Original file line number Diff line number Diff line change
Expand Up @@ -279,18 +279,6 @@ describe('Vote transaction class', () => {
expect(errors).not.to.be.empty;
expect(errors[0].dataPath).to.be.equal('.recipientId');
});

it('should return error when recipientPublicKey is empty', async () => {
const invalidTransaction = {
...validVoteTransactions[2],
recipientPublicKey: '',
};
const transaction = new VoteTransaction(invalidTransaction);

const errors = (transaction as any).validateAsset();
expect(errors).not.to.be.empty;
expect(errors[0].dataPath).to.be.equal('.recipientPublicKey');
});
});

describe('#applyAsset', () => {
Expand Down

0 comments on commit 262f5ff

Please sign in to comment.