From a45de6d4273ef3f4f6b676c948fc1b6e4c673ab7 Mon Sep 17 00:00:00 2001 From: Leonid Logvinov Date: Tue, 16 Jan 2018 15:50:15 +0100 Subject: Return is pensing events are undefined --- packages/0x.js/src/order_watcher/event_watcher.ts | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'packages/0x.js/src') diff --git a/packages/0x.js/src/order_watcher/event_watcher.ts b/packages/0x.js/src/order_watcher/event_watcher.ts index 43a60957b..5d05bfb60 100644 --- a/packages/0x.js/src/order_watcher/event_watcher.ts +++ b/packages/0x.js/src/order_watcher/event_watcher.ts @@ -51,6 +51,10 @@ export class EventWatcher { } private async _pollForBlockchainEventsAsync(callback: EventWatcherCallback): Promise { const pendingEvents = await this._getEventsAsync(); + if (_.isUndefined(pendingEvents)) { + // HACK: This should never happen, but happens frequently on CI due to a ganache bug + return; + } if (pendingEvents.length === 0) { // HACK: Sometimes when node rebuilds the pending block we get back the empty result. // We don't want to emit a lot of removal events and bring them back after a couple of miliseconds, -- cgit v1.2.3 From 9f47c72d31412d30471ab05dbb22780dd2f29036 Mon Sep 17 00:00:00 2001 From: Leonid Logvinov Date: Wed, 17 Jan 2018 16:07:49 +0100 Subject: Remove unused dependencies --- packages/0x.js/src/globals.d.ts | 12 ------------ 1 file changed, 12 deletions(-) (limited to 'packages/0x.js/src') diff --git a/packages/0x.js/src/globals.d.ts b/packages/0x.js/src/globals.d.ts index ff8e00b69..4f4932b6e 100644 --- a/packages/0x.js/src/globals.d.ts +++ b/packages/0x.js/src/globals.d.ts @@ -25,18 +25,6 @@ declare module '*.json' { /* tslint:enable */ } -// find-version declarations -declare function findVersions(version: string): string[]; -declare module 'find-versions' { - export = findVersions; -} - -// compare-version declarations -declare function compareVersions(firstVersion: string, secondVersion: string): number; -declare module 'compare-versions' { - export = compareVersions; -} - declare module 'ethereumjs-abi' { const soliditySHA3: (argTypes: string[], args: any[]) => Buffer; } -- cgit v1.2.3