aboutsummaryrefslogtreecommitdiffstats
path: root/packages/connect/src
diff options
context:
space:
mode:
authorfragosti <francesco.agosti93@gmail.com>2018-08-16 05:41:09 +0800
committerfragosti <francesco.agosti93@gmail.com>2018-08-16 05:41:09 +0800
commit41768617a9130828339f3c231322c176ce19fd1d (patch)
treee94bf7667f0ee36d530f0e458b4111e7ceb81a07 /packages/connect/src
parentbb992f8a49b42a1cd50d5bcc868f6d69fcd1a7ae (diff)
downloaddexon-sol-tools-41768617a9130828339f3c231322c176ce19fd1d.tar
dexon-sol-tools-41768617a9130828339f3c231322c176ce19fd1d.tar.gz
dexon-sol-tools-41768617a9130828339f3c231322c176ce19fd1d.tar.bz2
dexon-sol-tools-41768617a9130828339f3c231322c176ce19fd1d.tar.lz
dexon-sol-tools-41768617a9130828339f3c231322c176ce19fd1d.tar.xz
dexon-sol-tools-41768617a9130828339f3c231322c176ce19fd1d.tar.zst
dexon-sol-tools-41768617a9130828339f3c231322c176ce19fd1d.zip
Update test fixtures
Diffstat (limited to 'packages/connect/src')
-rw-r--r--packages/connect/src/http_client.ts3
-rw-r--r--packages/connect/src/types.ts4
-rw-r--r--packages/connect/src/utils/orderbook_channel_message_parser.ts2
3 files changed, 6 insertions, 3 deletions
diff --git a/packages/connect/src/http_client.ts b/packages/connect/src/http_client.ts
index 10c956ff8..7783af876 100644
--- a/packages/connect/src/http_client.ts
+++ b/packages/connect/src/http_client.ts
@@ -21,6 +21,7 @@ import {
OrdersResponse,
PagedRequestOpts,
PaginatedCollection,
+ FeeRecipientsResponse,
} from './types';
import { relayerResponseJsonParsers } from './utils/relayer_response_json_parsers';
@@ -140,7 +141,7 @@ export class HttpClient implements Client {
/**
* Retrieve the list of fee recipient addresses used by
*/
- public async getFeeRecipientsAsync(): Promise<PaginatedCollection<string>> {
+ public async getFeeRecipientsAsync(): Promise<FeeRecipientsResponse> {
return this._requestAsync('/fee_recipients', HttpRequestType.Get);
}
diff --git a/packages/connect/src/types.ts b/packages/connect/src/types.ts
index 8c2eaff7d..42417f709 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<PaginatedCollection<string>>;
+ getFeeRecipientsAsync: () => Promise<FeeRecipientsResponse>;
submitOrderAsync: (signedOrder: SignedOrder) => Promise<void>;
}
@@ -147,6 +147,8 @@ export interface OrderConfigResponse {
senderAddress: string;
}
+export type FeeRecipientsResponse = PaginatedCollection<string>;
+
export interface PagedRequestOpts {
page?: number;
perPage?: number;
diff --git a/packages/connect/src/utils/orderbook_channel_message_parser.ts b/packages/connect/src/utils/orderbook_channel_message_parser.ts
index 986209c54..97d8f2d6a 100644
--- a/packages/connect/src/utils/orderbook_channel_message_parser.ts
+++ b/packages/connect/src/utils/orderbook_channel_message_parser.ts
@@ -22,7 +22,7 @@ export const ordersChannelMessageParser = {
case OrdersChannelMessageTypes.Update: {
assert.doesConformToSchema('message', messageObj, schemas.relayerApiOrdersChannelUpdateSchema);
const orderJson = messageObj.payload;
- const order = relayerResponseJsonParsers.parseOrderJson(orderJson);
+ const order = relayerResponseJsonParsers.parseAPIOrderJson(orderJson);
return _.assign(messageObj, { payload: order });
}
default: {