Skip to content

Commit

Permalink
feat(ApostillePublicAccount): Add publicKey and address getters
Browse files Browse the repository at this point in the history
  • Loading branch information
jontey committed Aug 27, 2019
1 parent 1362a60 commit fc1d307
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/model/apostille/ApostillePublicAccount.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,4 +73,12 @@ export class ApostillePublicAccount {
);
}

get publicKey(): string {
return this.publicAccount.publicKey;
}

get address(): Address {
return this.publicAccount.address;
}

}
8 changes: 8 additions & 0 deletions tests/unit/model/apostille/ApostillePublicAccount.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,14 @@ describe('apostille public account transaction methods should work properly', ()

const updateTransaction = apostillePublicAccount.update('LuxTag is awesome');

it('has address getter', () => {
expect(apostillePublicAccount.publicAccount.address.plain()).toEqual(apostillePublicAccount.address.plain());
});

it('has publicKey getter', () => {
expect(apostillePublicAccount.publicAccount.publicKey).toEqual(apostillePublicAccount.publicKey);
});

it('should return correct update transaction', () => {
expect(updateTransaction.recipient).toEqual(apostillePublicAccount.publicAccount.address);
});
Expand Down

0 comments on commit fc1d307

Please sign in to comment.