From 95e9f33f6aa5fa7849279062b008afa763a465d8 Mon Sep 17 00:00:00 2001 From: Leonid Logvinov Date: Fri, 13 Jul 2018 17:45:25 +0200 Subject: Migrate order-watcher to v2 --- packages/order-watcher/src/types.ts | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) (limited to 'packages/order-watcher/src/types.ts') diff --git a/packages/order-watcher/src/types.ts b/packages/order-watcher/src/types.ts index 63e4e7848..7991df58c 100644 --- a/packages/order-watcher/src/types.ts +++ b/packages/order-watcher/src/types.ts @@ -1,4 +1,5 @@ -import { BlockParamLiteral, LogEntryEvent, OrderState } from '@0xproject/types'; +import { OrderState } from '@0xproject/types'; +import { BlockParamLiteral, LogEntryEvent } from 'ethereum-types'; export enum OrderWatcherError { SubscriptionAlreadyPresent = 'SUBSCRIPTION_ALREADY_PRESENT', @@ -8,20 +9,21 @@ export enum OrderWatcherError { export type EventWatcherCallback = (err: null | Error, log?: LogEntryEvent) => void; /** + * stateLayer: Optional blockchain state layer OrderWatcher will monitor for new events. Default=latest. * orderExpirationCheckingIntervalMs: How often to check for expired orders. Default=50. * eventPollingIntervalMs: How often to poll the Ethereum node for new events. Default=200. * expirationMarginMs: Amount of time before order expiry that you'd like to be notified * of an orders expiration. Default=0. * cleanupJobIntervalMs: How often to run a cleanup job which revalidates all the orders. Default=1hr. - * stateLayer: Optional blockchain state layer OrderWatcher will monitor for new events. Default=latest. + * isVerbose: Weather the order watcher should be verbose. Default=true. */ export interface OrderWatcherConfig { stateLayer: BlockParamLiteral; - orderExpirationCheckingIntervalMs?: number; - eventPollingIntervalMs?: number; - expirationMarginMs?: number; - cleanupJobIntervalMs?: number; - isVerbose?: boolean; + orderExpirationCheckingIntervalMs: number; + eventPollingIntervalMs: number; + expirationMarginMs: number; + cleanupJobIntervalMs: number; + isVerbose: boolean; } export type OnOrderStateChangeCallback = (err: Error | null, orderState?: OrderState) => void; -- cgit v1.2.3