Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Actually fix msgpack responses #215

Merged
merged 1 commit into from
Sep 23, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/client/v2/algod/block.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ class Block {
*/
async do(headers={}) {
let res = await this.c.get("/v2/blocks/" + this.round, this.query, headers);
if (res.body && res.body.length > 0) {
if (res.body && res.body.byteLength > 0) {
return encoding.decode(res.body);
}
return undefined;
Expand Down
2 changes: 1 addition & 1 deletion src/client/v2/algod/pendingTransactionInformation.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ class PendingTransactionInformation {
*/
async do(headers={}){
let res = await this.c.get("/v2/transactions/pending/" + this.txid, this.query, headers);
if (res.body && res.body.length > 0) {
if (res.body && res.body.byteLength > 0) {
return encoding.decode(res.body);
}
return undefined;
Expand Down
2 changes: 1 addition & 1 deletion src/client/v2/algod/pendingTransactions.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class PendingTransactions {
*/
async do(headers={}) {
let res = await this.c.get("/v2/transactions/pending", this.query, headers);
if (res.body && res.body.length > 0) {
if (res.body && res.body.byteLength > 0) {
return encoding.decode(res.body);
}
return undefined;
Expand Down
2 changes: 1 addition & 1 deletion src/client/v2/algod/pendingTransactionsByAddress.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class PendingTransactionsByAddress {
*/
async do(headers={}) {
let res = await this.c.get("/v2/accounts/" + this.address + "/transactions/pending", this.query, headers);
if (res.body && res.body.length > 0) {
if (res.body && res.body.byteLength > 0) {
return encoding.decode(res.body);
}
return undefined;
Expand Down