Skip to content

Commit

Permalink
Merge pull request #79 from PolymathNetwork/feature/reservation-data
Browse files Browse the repository at this point in the history
fix: return proper variables from toPojo
  • Loading branch information
monitz87 authored Sep 2, 2019
2 parents 96be2ba + 1307153 commit 38ea583
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions src/entities/SecurityTokenReservation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -116,13 +116,13 @@ export class SecurityTokenReservation extends Entity<Params> {
};

public toPojo() {
const { uid, symbol, expiry, securityTokenAddress } = this;
const { uid, symbol, expiry, securityTokenAddress, reservedAt, ownerAddress } = this;

return { uid, symbol, expiry, securityTokenAddress };
return { uid, symbol, expiry, securityTokenAddress, reservedAt, ownerAddress };
}

public _refresh(params: Partial<Params>) {
const { expiry, securityTokenAddress } = params;
const { expiry, securityTokenAddress, reservedAt, ownerAddress } = params;

if (expiry) {
this.expiry = expiry;
Expand All @@ -131,5 +131,13 @@ export class SecurityTokenReservation extends Entity<Params> {
if (securityTokenAddress) {
this.securityTokenAddress = securityTokenAddress;
}

if (reservedAt) {
this.reservedAt = reservedAt;
}

if (ownerAddress) {
this.ownerAddress = ownerAddress;
}
}
}

0 comments on commit 38ea583

Please sign in to comment.