diff options
author | fragosti <francesco.agosti93@gmail.com> | 2018-08-16 08:52:13 +0800 |
---|---|---|
committer | fragosti <francesco.agosti93@gmail.com> | 2018-08-16 08:52:13 +0800 |
commit | ca5e52920d5fd8388fc1f62f0a98908adfc69c08 (patch) | |
tree | fb0b468195aa991fd9ad5065afb2d7882543077b /packages/connect/src/http_client.ts | |
parent | 30dfb7511dc695b2dc7514c2908e632e0969ddfd (diff) | |
download | dexon-sol-tools-ca5e52920d5fd8388fc1f62f0a98908adfc69c08.tar dexon-sol-tools-ca5e52920d5fd8388fc1f62f0a98908adfc69c08.tar.gz dexon-sol-tools-ca5e52920d5fd8388fc1f62f0a98908adfc69c08.tar.bz2 dexon-sol-tools-ca5e52920d5fd8388fc1f62f0a98908adfc69c08.tar.lz dexon-sol-tools-ca5e52920d5fd8388fc1f62f0a98908adfc69c08.tar.xz dexon-sol-tools-ca5e52920d5fd8388fc1f62f0a98908adfc69c08.tar.zst dexon-sol-tools-ca5e52920d5fd8388fc1f62f0a98908adfc69c08.zip |
Add fee recipients test
Diffstat (limited to 'packages/connect/src/http_client.ts')
-rw-r--r-- | packages/connect/src/http_client.ts | 10 |
1 files changed, 7 insertions, 3 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 |