diff options
author | Leonid <logvinov.leon@gmail.com> | 2018-01-18 21:16:53 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-01-18 21:16:53 +0800 |
commit | e5eec04f92b51319dc55c46c9be7b9d6fe5a1e48 (patch) | |
tree | 5f3e52435f66ad1b7a73af83f95ccbff8a7cef9a /packages/0x.js/src | |
parent | 87e3fe725d2070cb89c71361a3107f45336ee3bc (diff) | |
parent | b4375d6f64fc0651c7ba347fcfe36e171fa261fc (diff) | |
download | dexon-sol-tools-e5eec04f92b51319dc55c46c9be7b9d6fe5a1e48.tar.gz dexon-sol-tools-e5eec04f92b51319dc55c46c9be7b9d6fe5a1e48.tar.zst dexon-sol-tools-e5eec04f92b51319dc55c46c9be7b9d6fe5a1e48.zip |
Merge pull request #322 from 0xProject/fix/ci-time
Speed-up CI
Diffstat (limited to 'packages/0x.js/src')
-rw-r--r-- | packages/0x.js/src/globals.d.ts | 12 | ||||
-rw-r--r-- | packages/0x.js/src/order_watcher/event_watcher.ts | 4 |
2 files changed, 4 insertions, 12 deletions
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; } 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<void> { 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, |