diff options
author | Brandon Millman <brandon@0xproject.com> | 2017-11-23 05:31:16 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-11-23 05:31:16 +0800 |
commit | 0b2951483635f8b1e120eacb53aef52bfbbecc49 (patch) | |
tree | a9de0b9159e788b902150fec83c77fd0a351fd96 /packages/connect/src | |
parent | 0e03ef385b03f5b2f916f38001553b1c1c18c383 (diff) | |
parent | 27ce87f6529087bd511cae68bec5fb2dfa91649d (diff) | |
download | dexon-sol-tools-0b2951483635f8b1e120eacb53aef52bfbbecc49.tar dexon-sol-tools-0b2951483635f8b1e120eacb53aef52bfbbecc49.tar.gz dexon-sol-tools-0b2951483635f8b1e120eacb53aef52bfbbecc49.tar.bz2 dexon-sol-tools-0b2951483635f8b1e120eacb53aef52bfbbecc49.tar.lz dexon-sol-tools-0b2951483635f8b1e120eacb53aef52bfbbecc49.tar.xz dexon-sol-tools-0b2951483635f8b1e120eacb53aef52bfbbecc49.tar.zst dexon-sol-tools-0b2951483635f8b1e120eacb53aef52bfbbecc49.zip |
Merge pull request #232 from 0xProject/feature/prepareConnectForPublish
Prepare connect package for publishing
Diffstat (limited to 'packages/connect/src')
-rw-r--r-- | packages/connect/src/http_client.ts | 8 | ||||
-rw-r--r-- | packages/connect/src/index.ts | 4 |
2 files changed, 7 insertions, 5 deletions
diff --git a/packages/connect/src/http_client.ts b/packages/connect/src/http_client.ts index ab8c6bfa1..85dc83c61 100644 --- a/packages/connect/src/http_client.ts +++ b/packages/connect/src/http_client.ts @@ -18,6 +18,11 @@ import { import {schemas as clientSchemas} from './schemas/schemas'; import {typeConverters} from './utils/type_converters'; +// TODO: move this and bigNumberConfigs in the 0x.js package into one place +BigNumber.config({ + EXPONENTIAL_AT: 1000, +}); + interface RequestOptions { params?: object; payload?: object; @@ -157,9 +162,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, |