aboutsummaryrefslogtreecommitdiffstats
path: root/packages/connect/src/http_client.ts
diff options
context:
space:
mode:
authorfragosti <francesco.agosti93@gmail.com>2018-08-15 05:40:52 +0800
committerfragosti <francesco.agosti93@gmail.com>2018-08-15 05:40:52 +0800
commitce88086e080e05ed71c1ef4e31f2d0ce530af67f (patch)
treef2022bb7bc42c9bc85cbef19c684b666e2d7f66f /packages/connect/src/http_client.ts
parentc1cc92a46f9ebfa4408a5dc515f1e100fe3a7054 (diff)
downloaddexon-sol-tools-ce88086e080e05ed71c1ef4e31f2d0ce530af67f.tar
dexon-sol-tools-ce88086e080e05ed71c1ef4e31f2d0ce530af67f.tar.gz
dexon-sol-tools-ce88086e080e05ed71c1ef4e31f2d0ce530af67f.tar.bz2
dexon-sol-tools-ce88086e080e05ed71c1ef4e31f2d0ce530af67f.tar.lz
dexon-sol-tools-ce88086e080e05ed71c1ef4e31f2d0ce530af67f.tar.xz
dexon-sol-tools-ce88086e080e05ed71c1ef4e31f2d0ce530af67f.tar.zst
dexon-sol-tools-ce88086e080e05ed71c1ef4e31f2d0ce530af67f.zip
Update types to reflect v2
Diffstat (limited to 'packages/connect/src/http_client.ts')
-rw-r--r--packages/connect/src/http_client.ts22
1 files changed, 11 insertions, 11 deletions
diff --git a/packages/connect/src/http_client.ts b/packages/connect/src/http_client.ts
index 1b51ee429..b2e15775e 100644
--- a/packages/connect/src/http_client.ts
+++ b/packages/connect/src/http_client.ts
@@ -9,8 +9,8 @@ import { schemas as clientSchemas } from './schemas/schemas';
import {
AssetPairsRequestOpts,
Client,
- FeesRequest,
- FeesResponse,
+ OrderConfigRequest,
+ OrderConfigResponse,
HttpRequestOptions,
HttpRequestType,
OrderbookRequest,
@@ -65,8 +65,8 @@ export class HttpClient implements Client {
this._apiEndpointUrl = url.replace(TRAILING_SLASHES_REGEX, ''); // remove trailing slashes
}
/**
- * Retrieve token pair info from the API
- * @param requestOpts Options specifying token information to retrieve and page information, defaults to { page: 1, perPage: 100 }
+ * Retrieve assetData pair info from the API
+ * @param requestOpts Options specifying assetData information to retrieve and page information, defaults to { page: 1, perPage: 100 }
* @return The resulting TokenPairsItems that match the request
*/
public async getAssetPairsAsync(requestOpts?: AssetPairsRequestOpts & PagedRequestOpts): Promise<TokenPairsItem[]> {
@@ -77,9 +77,9 @@ export class HttpClient implements Client {
const httpRequestOpts = {
params: _.defaults({}, requestOpts, DEFAULT_PAGED_REQUEST_OPTS),
};
- const responseJson = await this._requestAsync('/token_pairs', HttpRequestType.Get, httpRequestOpts);
- const tokenPairs = relayerResponseJsonParsers.parseTokenPairsJson(responseJson);
- return tokenPairs;
+ const responseJson = await this._requestAsync('/assetData_pairs', HttpRequestType.Get, httpRequestOpts);
+ const assetDataPairs = relayerResponseJsonParsers.parseTokenPairsJson(responseJson);
+ return assetDataPairs;
}
/**
* Retrieve orders from the API
@@ -132,16 +132,16 @@ export class HttpClient implements Client {
}
/**
* Retrieve fee information from the API
- * @param request A FeesRequest instance describing the specific fees to retrieve
- * @return The resulting FeesResponse that matches the request
+ * @param request A OrderConfigRequest instance describing the specific fees to retrieve
+ * @return The resulting OrderConfigResponse that matches the request
*/
- public async getOrderConfigAsync(request: FeesRequest): Promise<FeesResponse> {
+ public async getOrderConfigAsync(request: OrderConfigRequest): Promise<OrderConfigResponse> {
assert.doesConformToSchema('request', request, clientSchemas.feesRequestSchema);
const httpRequestOpts = {
payload: request,
};
const responseJson = await this._requestAsync('/fees', HttpRequestType.Post, httpRequestOpts);
- const fees = relayerResponseJsonParsers.parseFeesResponseJson(responseJson);
+ const fees = relayerResponseJsonParsers.parseOrderConfigResponseJson(responseJson);
return fees;
}
/**