Skip to content

Commit

Permalink
undefinded check for /txs endpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
yun-yeo committed Aug 23, 2021
1 parent 3caed63 commit 9c3423d
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@terra-money/terra.js",
"version": "2.0.2",
"version": "2.0.3",
"description": "The JavaScript SDK for Terra",
"license": "MIT",
"author": "Terraform Labs, PTE.",
Expand Down
4 changes: 2 additions & 2 deletions src/client/lcd/api/TxAPI.ts
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ export namespace TxSearchResult {
page_number: string;
page_total: string;
limit: string;
txs: TxInfo.Data[];
txs?: TxInfo.Data[];
}
}

Expand Down Expand Up @@ -402,7 +402,7 @@ export class TxAPI extends BaseAPI {
page_number: Number.parseInt(d.page_number),
page_total: Number.parseInt(d.page_total),
limit: Number.parseInt(d.limit),
txs: d.txs.map(txdata => TxInfo.fromData(txdata)),
txs: d.txs ? d.txs.map(txdata => TxInfo.fromData(txdata)) : [],
}));
}
}

0 comments on commit 9c3423d

Please sign in to comment.