diff options
author | Leonid Logvinov <logvinov.leon@gmail.com> | 2018-07-18 21:27:38 +0800 |
---|---|---|
committer | Leonid Logvinov <logvinov.leon@gmail.com> | 2018-07-18 21:27:38 +0800 |
commit | dad557164ea4ccc012243d43df013078a7c37eb6 (patch) | |
tree | 88e8477941dc0c98273fcb054086b2e89d034e19 /packages/connect/src | |
parent | acff177c547dee049b97e4b051fe22e1efaf992c (diff) | |
parent | f3241ff86a0d99f4291c5a5f4eaaa5ebe1736da0 (diff) | |
download | dexon-sol-tools-dad557164ea4ccc012243d43df013078a7c37eb6.tar dexon-sol-tools-dad557164ea4ccc012243d43df013078a7c37eb6.tar.gz dexon-sol-tools-dad557164ea4ccc012243d43df013078a7c37eb6.tar.bz2 dexon-sol-tools-dad557164ea4ccc012243d43df013078a7c37eb6.tar.lz dexon-sol-tools-dad557164ea4ccc012243d43df013078a7c37eb6.tar.xz dexon-sol-tools-dad557164ea4ccc012243d43df013078a7c37eb6.tar.zst dexon-sol-tools-dad557164ea4ccc012243d43df013078a7c37eb6.zip |
Merge branch 'v2-prototype' into feature/order-watcher-v2
Diffstat (limited to 'packages/connect/src')
-rw-r--r-- | packages/connect/src/http_client.ts | 2 | ||||
-rw-r--r-- | packages/connect/src/utils/type_converters.ts | 6 | ||||
-rw-r--r-- | packages/connect/src/ws_orderbook_channel.ts | 6 |
3 files changed, 7 insertions, 7 deletions
diff --git a/packages/connect/src/http_client.ts b/packages/connect/src/http_client.ts index f3800d581..03cc590e4 100644 --- a/packages/connect/src/http_client.ts +++ b/packages/connect/src/http_client.ts @@ -38,7 +38,7 @@ const OPTS_TO_QUERY_FIELD_MAP = { * that implement the standard relayer API v0 */ export class HttpClient implements Client { - private _apiEndpointUrl: string; + private readonly _apiEndpointUrl: string; /** * Format parameters to be appended to http requests into query string form */ diff --git a/packages/connect/src/utils/type_converters.ts b/packages/connect/src/utils/type_converters.ts index c1808ce8a..210d452b9 100644 --- a/packages/connect/src/utils/type_converters.ts +++ b/packages/connect/src/utils/type_converters.ts @@ -6,12 +6,12 @@ export const typeConverters = { const bids = _.get(orderbook, 'bids', []); const asks = _.get(orderbook, 'asks', []); return { - bids: bids.map((order: any) => this.convertOrderStringFieldsToBigNumber(order)), - asks: asks.map((order: any) => this.convertOrderStringFieldsToBigNumber(order)), + bids: bids.map((order: any) => typeConverters.convertOrderStringFieldsToBigNumber(order)), + asks: asks.map((order: any) => typeConverters.convertOrderStringFieldsToBigNumber(order)), }; }, convertOrderStringFieldsToBigNumber(order: any): any { - return this.convertStringsFieldsToBigNumbers(order, [ + return typeConverters.convertStringsFieldsToBigNumbers(order, [ 'makerTokenAmount', 'takerTokenAmount', 'makerFee', diff --git a/packages/connect/src/ws_orderbook_channel.ts b/packages/connect/src/ws_orderbook_channel.ts index e1c55cce3..fa9f5e37f 100644 --- a/packages/connect/src/ws_orderbook_channel.ts +++ b/packages/connect/src/ws_orderbook_channel.ts @@ -15,9 +15,9 @@ import { orderbookChannelMessageParser } from './utils/orderbook_channel_message * that implements the standard relayer API v0 */ export class WebSocketOrderbookChannel implements OrderbookChannel { - private _client: WebSocket.w3cwebsocket; - private _handler: OrderbookChannelHandler; - private _subscriptionOptsList: OrderbookChannelSubscriptionOpts[] = []; + private readonly _client: WebSocket.w3cwebsocket; + private readonly _handler: OrderbookChannelHandler; + private readonly _subscriptionOptsList: OrderbookChannelSubscriptionOpts[] = []; /** * Instantiates a new WebSocketOrderbookChannel instance * @param client A WebSocket client |