aboutsummaryrefslogtreecommitdiffstats
path: root/packages/connect/src
diff options
context:
space:
mode:
Diffstat (limited to 'packages/connect/src')
-rw-r--r--packages/connect/src/http_client.ts10
-rw-r--r--packages/connect/src/types.ts2
2 files changed, 8 insertions, 4 deletions
diff --git a/packages/connect/src/http_client.ts b/packages/connect/src/http_client.ts
index 35d7ee77e..5aeba19dd 100644
--- a/packages/connect/src/http_client.ts
+++ b/packages/connect/src/http_client.ts
@@ -140,10 +140,14 @@ export class HttpClient implements Client {
/**
* Retrieve the list of fee recipient addresses used by
*/
- public async getFeeRecipientsAsync(): Promise<FeeRecipientsResponse> {
- return this._requestAsync('/fee_recipients', HttpRequestType.Get);
+ public async getFeeRecipientsAsync(requestOpts?: PagedRequestOpts): Promise<FeeRecipientsResponse> {
+ if (!_.isUndefined(requestOpts)) {
+ assert.doesConformToSchema('requestOpts', requestOpts, clientSchemas.pagedRequestOptsSchema);
+ }
+ const feeRecipients = await this._requestAsync('/fee_recipients', HttpRequestType.Get);
+ assert.doesConformToSchema('feeRecipients', feeRecipients, schemas.relayerApiFeeRecipientsResponseSchema);
+ return feeRecipients;
}
-
/**
* Submit a signed order to the API
* @param signedOrder A SignedOrder instance to submit
diff --git a/packages/connect/src/types.ts b/packages/connect/src/types.ts
index 42417f709..44ea4abd6 100644
--- a/packages/connect/src/types.ts
+++ b/packages/connect/src/types.ts
@@ -7,7 +7,7 @@ export interface Client {
getOrderAsync: (orderHash: string) => Promise<APIOrder>;
getOrderbookAsync: (request: OrderbookRequest, requestOpts?: PagedRequestOpts) => Promise<OrderbookResponse>;
getOrderConfigAsync: (request: OrderConfigRequest) => Promise<OrderConfigResponse>;
- getFeeRecipientsAsync: () => Promise<FeeRecipientsResponse>;
+ getFeeRecipientsAsync: (requestOpts?: PagedRequestOpts) => Promise<FeeRecipientsResponse>;
submitOrderAsync: (signedOrder: SignedOrder) => Promise<void>;
}