Skip to content

Commit

Permalink
Typescript: Add toJSON for Asset and Symbol types (#17)
Browse files Browse the repository at this point in the history
  • Loading branch information
maxifom authored Jun 26, 2022
1 parent 4b62444 commit 8e1d423
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions templates/ts/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,10 @@ export class Symbol {
this.precision = Number.parseInt(precision);
this.symbol_code = symbol_code;
}
public toJSON() {
return this.raw;
}
}
export class Asset {
Expand All @@ -64,6 +68,10 @@ export class Asset {
this.quantity = Number.parseFloat(quantity);
this.symbol_code = symbol_code;
}
public toJSON() {
return this.raw;
}
}
export type ExtendedAssetType = {
Expand Down

0 comments on commit 8e1d423

Please sign in to comment.