Skip to content

Commit

Permalink
Merge pull request #1161 from LiskHQ/1158-fix_recipientId_validation
Browse files Browse the repository at this point in the history
Change recipientId to accept null - Closes #1158
  • Loading branch information
shuse2 committed Mar 4, 2019
2 parents 5250dca + c3d611f commit 0845f16
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion packages/lisk-transactions/src/base_transaction.ts
Expand Up @@ -151,7 +151,7 @@ export abstract class BaseTransaction {
this.amount = new BigNum(rawTransaction.amount);
this.fee = new BigNum(rawTransaction.fee);
this._id = rawTransaction.id;
this.recipientId = rawTransaction.recipientId;
this.recipientId = rawTransaction.recipientId || '';
this.recipientPublicKey = rawTransaction.recipientPublicKey || '';
this.senderId =
rawTransaction.senderId ||
Expand Down
2 changes: 1 addition & 1 deletion packages/lisk-transactions/src/transaction_types.ts
Expand Up @@ -38,7 +38,7 @@ export interface TransactionJSON {
readonly asset: object;
readonly fee: string | number;
readonly id?: string;
readonly recipientId: string;
readonly recipientId: string | null;
readonly recipientPublicKey?: string;
readonly senderId?: string;
readonly senderPublicKey: string;
Expand Down
2 changes: 1 addition & 1 deletion packages/lisk-transactions/src/utils/validation/schema.ts
Expand Up @@ -39,7 +39,7 @@ export const transaction = {
type: 'string',
},
recipientId: {
type: 'string',
type: ['string', 'null'],
},
recipientPublicKey: {
type: ['string', 'null'],
Expand Down

0 comments on commit 0845f16

Please sign in to comment.