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

Remove the requirement for recipient_public_key property for vote transaction #1202

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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