diff options
author | Fabio Berger <me@fabioberger.com> | 2017-12-09 01:21:51 +0800 |
---|---|---|
committer | Fabio Berger <me@fabioberger.com> | 2017-12-09 01:21:51 +0800 |
commit | af8d24d0eb5af781f4731b5559979f2b02579785 (patch) | |
tree | 6f429e6f2b3050de6dd7ce16e42c7f387bd5018a /packages/connect | |
parent | ca85a97106ea6d09fbceafac8f9516945ccff399 (diff) | |
parent | 5eea829be9f5e8669c40dac965231051b668ed37 (diff) | |
download | dexon-sol-tools-af8d24d0eb5af781f4731b5559979f2b02579785.tar dexon-sol-tools-af8d24d0eb5af781f4731b5559979f2b02579785.tar.gz dexon-sol-tools-af8d24d0eb5af781f4731b5559979f2b02579785.tar.bz2 dexon-sol-tools-af8d24d0eb5af781f4731b5559979f2b02579785.tar.lz dexon-sol-tools-af8d24d0eb5af781f4731b5559979f2b02579785.tar.xz dexon-sol-tools-af8d24d0eb5af781f4731b5559979f2b02579785.tar.zst dexon-sol-tools-af8d24d0eb5af781f4731b5559979f2b02579785.zip |
Merge branch 'development' into feature/addSubproviders
* development:
Update README.md
Inline network module
Stop supporting different file extensions in abi-gen
Refactor networkId out of web3Wrapper
Update connect types in preperation for publishing
Fix CI command
Address feedback
Refactor web3Wrapper to a separate package
# Conflicts:
# package.json
# packages/website/ts/blockchain.ts
Diffstat (limited to 'packages/connect')
-rw-r--r-- | packages/connect/CHANGELOG.md | 1 | ||||
-rw-r--r-- | packages/connect/src/types.ts | 4 | ||||
-rw-r--r-- | packages/connect/src/ws_orderbook_channel.ts | 2 | ||||
-rw-r--r-- | packages/connect/test/http_client_test.ts | 6 |
4 files changed, 6 insertions, 7 deletions
diff --git a/packages/connect/CHANGELOG.md b/packages/connect/CHANGELOG.md index 3637ed2d1..cf507dbe6 100644 --- a/packages/connect/CHANGELOG.md +++ b/packages/connect/CHANGELOG.md @@ -3,6 +3,7 @@ vx.x.x ------------------------ * Expose WebSocketOrderbookChannel and associated types to public interface (#251) + * Remove tokenA and tokenB fields from OrdersRequest (#256) v0.2.0 - _November 29, 2017_ ------------------------ diff --git a/packages/connect/src/types.ts b/packages/connect/src/types.ts index 0657a1d63..d02444a3e 100644 --- a/packages/connect/src/types.ts +++ b/packages/connect/src/types.ts @@ -63,7 +63,7 @@ export interface OrderbookChannelHandler { order: SignedOrder) => void; onError: (channel: OrderbookChannel, subscriptionOpts: OrderbookChannelSubscriptionOpts, err: Error) => void; - onClose: (channel: OrderbookChannel) => void; + onClose: (channel: OrderbookChannel, subscriptionOpts: OrderbookChannelSubscriptionOpts) => void; } export type OrderbookChannelMessage = @@ -128,8 +128,6 @@ export interface OrdersRequest { tokenAddress?: string; makerTokenAddress?: string; takerTokenAddress?: string; - tokenA?: string; - tokenB?: string; maker?: string; taker?: string; trader?: string; diff --git a/packages/connect/src/ws_orderbook_channel.ts b/packages/connect/src/ws_orderbook_channel.ts index 346be20c0..6687025c0 100644 --- a/packages/connect/src/ws_orderbook_channel.ts +++ b/packages/connect/src/ws_orderbook_channel.ts @@ -62,7 +62,7 @@ export class WebSocketOrderbookChannel implements OrderbookChannel { handler.onError(this, subscriptionOpts, wsError); }); connection.on(WebsocketConnectionEventType.Close, () => { - handler.onClose(this); + handler.onClose(this, subscriptionOpts); }); connection.on(WebsocketConnectionEventType.Message, message => { this._handleWebSocketMessage(subscribeMessage.requestId, subscriptionOpts, message, handler); diff --git a/packages/connect/test/http_client_test.ts b/packages/connect/test/http_client_test.ts index 3d72ca185..21e7abb69 100644 --- a/packages/connect/test/http_client_test.ts +++ b/packages/connect/test/http_client_test.ts @@ -61,12 +61,12 @@ describe('HttpClient', () => { const orders = await relayerClient.getOrdersAsync(); expect(orders).to.be.deep.equal(ordersResponse); }); - it('gets specfic orders for request', async () => { + it('gets specific orders for request', async () => { const tokenAddress = '0x323b5d4c32345ced77393b3530b1eed0f346429d'; const ordersRequest = { - tokenA: tokenAddress, + tokenAddress, }; - const urlWithQuery = `${url}?tokenA=${tokenAddress}`; + const urlWithQuery = `${url}?tokenAddress=${tokenAddress}`; fetchMock.get(urlWithQuery, ordersResponseJSON); const orders = await relayerClient.getOrdersAsync(ordersRequest); expect(orders).to.be.deep.equal(ordersResponse); |