diff options
author | Francesco Agosti <francesco.agosti93@gmail.com> | 2018-08-23 06:39:14 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-08-23 06:39:14 +0800 |
commit | cb19623a3aaf22a386bd4a7d6477048a604be9a2 (patch) | |
tree | 4d9512006aac8828e6311dc1f60707c654451469 /packages/connect/src/utils/assert.ts | |
parent | e915d72202f66155e74e22cf7df66d37e726f38f (diff) | |
parent | c83f2a070cd5464af99785692efa82ba6f415a41 (diff) | |
download | dexon-sol-tools-cb19623a3aaf22a386bd4a7d6477048a604be9a2.tar dexon-sol-tools-cb19623a3aaf22a386bd4a7d6477048a604be9a2.tar.gz dexon-sol-tools-cb19623a3aaf22a386bd4a7d6477048a604be9a2.tar.bz2 dexon-sol-tools-cb19623a3aaf22a386bd4a7d6477048a604be9a2.tar.lz dexon-sol-tools-cb19623a3aaf22a386bd4a7d6477048a604be9a2.tar.xz dexon-sol-tools-cb19623a3aaf22a386bd4a7d6477048a604be9a2.tar.zst dexon-sol-tools-cb19623a3aaf22a386bd4a7d6477048a604be9a2.zip |
Merge pull request #974 from 0xProject/feature/connect/sra-api-v2
[connect][sra-api][json-schemas] Update Connect to SRA v2
Diffstat (limited to 'packages/connect/src/utils/assert.ts')
-rw-r--r-- | packages/connect/src/utils/assert.ts | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/packages/connect/src/utils/assert.ts b/packages/connect/src/utils/assert.ts index a0fd12fbd..3d8f1c799 100644 --- a/packages/connect/src/utils/assert.ts +++ b/packages/connect/src/utils/assert.ts @@ -10,15 +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.relayerApiOrderbookChannelSubscribePayload, + schemas.relayerApiOrdersChannelSubscribePayload, ); }, - isOrderbookChannelHandler(variableName: string, handler: any): void { - sharedAssert.isFunction(`${variableName}.onSnapshot`, _.get(handler, 'onSnapshot')); + 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')); |