From 80e5127a469a0f38cddc18a45a4a7e019191760c Mon Sep 17 00:00:00 2001 From: fragosti Date: Tue, 14 Aug 2018 17:16:03 -0700 Subject: Update types and add missing param to SRA spec --- packages/connect/src/utils/assert.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'packages/connect/src/utils/assert.ts') diff --git a/packages/connect/src/utils/assert.ts b/packages/connect/src/utils/assert.ts index a0fd12fbd..353b7f29f 100644 --- a/packages/connect/src/utils/assert.ts +++ b/packages/connect/src/utils/assert.ts @@ -14,11 +14,10 @@ export const assert = { sharedAssert.doesConformToSchema( variableName, subscriptionOpts, - schemas.relayerApiOrderbookChannelSubscribePayload, + schemas.relayerApiOrdersChannelSubscribePayload, ); }, isOrderbookChannelHandler(variableName: string, handler: any): void { - sharedAssert.isFunction(`${variableName}.onSnapshot`, _.get(handler, 'onSnapshot')); sharedAssert.isFunction(`${variableName}.onUpdate`, _.get(handler, 'onUpdate')); sharedAssert.isFunction(`${variableName}.onError`, _.get(handler, 'onError')); sharedAssert.isFunction(`${variableName}.onClose`, _.get(handler, 'onClose')); -- cgit v1.2.3 From 64a85dfb9cc60212dcf1c70ca7be4874936dd332 Mon Sep 17 00:00:00 2001 From: fragosti Date: Thu, 16 Aug 2018 17:03:11 -0700 Subject: Rename websocket files and types --- packages/connect/src/utils/assert.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'packages/connect/src/utils/assert.ts') diff --git a/packages/connect/src/utils/assert.ts b/packages/connect/src/utils/assert.ts index 353b7f29f..3d8f1c799 100644 --- a/packages/connect/src/utils/assert.ts +++ b/packages/connect/src/utils/assert.ts @@ -10,14 +10,14 @@ import * as _ from 'lodash'; export const assert = { ...sharedAssert, - isOrderbookChannelSubscriptionOpts(variableName: string, subscriptionOpts: any): void { + isOrdersChannelSubscriptionOpts(variableName: string, subscriptionOpts: any): void { sharedAssert.doesConformToSchema( variableName, subscriptionOpts, schemas.relayerApiOrdersChannelSubscribePayload, ); }, - isOrderbookChannelHandler(variableName: string, handler: any): void { + isOrdersChannelHandler(variableName: string, handler: any): void { sharedAssert.isFunction(`${variableName}.onUpdate`, _.get(handler, 'onUpdate')); sharedAssert.isFunction(`${variableName}.onError`, _.get(handler, 'onError')); sharedAssert.isFunction(`${variableName}.onClose`, _.get(handler, 'onClose')); -- cgit v1.2.3