From a61a7b688a03590ba0d09d985db53311eb435bfd Mon Sep 17 00:00:00 2001 From: Brandon Millman Date: Tue, 21 Nov 2017 18:45:02 -0800 Subject: Prepare connect package for publishing --- packages/connect/src/http_client.ts | 7 ++++++- packages/connect/src/index.ts | 4 ---- 2 files changed, 6 insertions(+), 5 deletions(-) (limited to 'packages/connect/src') diff --git a/packages/connect/src/http_client.ts b/packages/connect/src/http_client.ts index ab8c6bfa1..3dd0fb55e 100644 --- a/packages/connect/src/http_client.ts +++ b/packages/connect/src/http_client.ts @@ -18,6 +18,10 @@ import { import {schemas as clientSchemas} from './schemas/schemas'; import {typeConverters} from './utils/type_converters'; +BigNumber.config({ + EXPONENTIAL_AT: 1000, +}); + interface RequestOptions { params?: object; payload?: object; @@ -157,9 +161,10 @@ export class HttpClient implements Client { const headers = new Headers({ 'content-type': 'application/json', }); + const response = await fetch(url, { method: requestType, - body: payload, + body: JSON.stringify(payload), headers, }); if (!response.ok) { diff --git a/packages/connect/src/index.ts b/packages/connect/src/index.ts index 5e97f4f26..c9ebde510 100644 --- a/packages/connect/src/index.ts +++ b/packages/connect/src/index.ts @@ -1,12 +1,8 @@ export {HttpClient} from './http_client'; -export {WebSocketOrderbookChannel} from './ws_orderbook_channel'; export { Client, FeesRequest, FeesResponse, - OrderbookChannel, - OrderbookChannelHandler, - OrderbookChannelSubscriptionOpts, OrderbookRequest, OrderbookResponse, OrdersRequest, -- cgit v1.2.3