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

Handle empty value passed to page request #47

Merged
merged 1 commit into from
Sep 26, 2021
Merged
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
6 changes: 4 additions & 2 deletions src/fireblocks-sdk.ts
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,7 @@ export class FireblocksSDK {
public async getTransactions(filter: TransactionFilter): Promise<TransactionResponse[]> {
return await this.apiClient.issueGetRequest(`/v1/transactions?${queryString.stringify(filter)}`);
}

/**
* Gets a list of transactions per page matching the given filter or path
* @param pageFilter Get transactions matching pageFilter params
Expand All @@ -295,6 +295,8 @@ export class FireblocksSDK {
const path = nextOrPreviousPath.substring(index, nextOrPreviousPath.length);
return await this.apiClient.issueGetRequest(path, true);
}

return {transactions: [], pageDetails: { prevPage: "", nextPage: "" }};
}

/**
Expand Down Expand Up @@ -806,7 +808,7 @@ export class FireblocksSDK {
public async resendWebhooks(): Promise<ResendWebhooksResponse> {
return await this.apiClient.issuePostRequest("/v1/webhooks/resend", {});
}

/**
* Gets all Users for your tenant
*/
Expand Down