Callback for subscribe no longer supports an Async Callback
This commit is contained in:
		@@ -52,8 +52,7 @@ export class ContractWrapper {
 | 
				
			|||||||
            throw new Error(ZeroExError.SubscriptionNotFound);
 | 
					            throw new Error(ZeroExError.SubscriptionNotFound);
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
        if (!_.isUndefined(err)) {
 | 
					        if (!_.isUndefined(err)) {
 | 
				
			||||||
            const callback = this._filterCallbacks[filterToken];
 | 
					            this._filterCallbacks[filterToken](err, undefined);
 | 
				
			||||||
            callback(err, undefined);
 | 
					 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
        delete this._filters[filterToken];
 | 
					        delete this._filters[filterToken];
 | 
				
			||||||
        delete this._filterCallbacks[filterToken];
 | 
					        delete this._filterCallbacks[filterToken];
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -6,8 +6,6 @@ export {
 | 
				
			|||||||
    ECSignature,
 | 
					    ECSignature,
 | 
				
			||||||
    ZeroExError,
 | 
					    ZeroExError,
 | 
				
			||||||
    EventCallback,
 | 
					    EventCallback,
 | 
				
			||||||
    EventCallbackAsync,
 | 
					 | 
				
			||||||
    EventCallbackSync,
 | 
					 | 
				
			||||||
    ExchangeContractErrs,
 | 
					    ExchangeContractErrs,
 | 
				
			||||||
    ContractEvent,
 | 
					    ContractEvent,
 | 
				
			||||||
    Token,
 | 
					    Token,
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -81,7 +81,7 @@ export class EventWatcher {
 | 
				
			|||||||
                ...log,
 | 
					                ...log,
 | 
				
			||||||
            };
 | 
					            };
 | 
				
			||||||
            if (!_.isUndefined(this._intervalIdIfExists)) {
 | 
					            if (!_.isUndefined(this._intervalIdIfExists)) {
 | 
				
			||||||
                await callback(logEvent);
 | 
					                callback(logEvent);
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -42,13 +42,8 @@ export type OrderValues = [BigNumber, BigNumber, BigNumber,
 | 
				
			|||||||
export type LogEvent = Web3.LogEntryEvent;
 | 
					export type LogEvent = Web3.LogEntryEvent;
 | 
				
			||||||
export type DecodedLogEvent<ArgsType> = Web3.DecodedLogEntryEvent<ArgsType>;
 | 
					export type DecodedLogEvent<ArgsType> = Web3.DecodedLogEntryEvent<ArgsType>;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
export type EventCallbackAsync<ArgsType> = (err: null|Error, log?: DecodedLogEvent<ArgsType>) => Promise<void>;
 | 
					export type EventCallback<ArgsType> = (err: null|Error, log?: DecodedLogEvent<ArgsType>) => void;
 | 
				
			||||||
export type EventCallbackSync<ArgsType> = (err: null|Error, log?: DecodedLogEvent<ArgsType>) => void;
 | 
					export type EventWatcherCallback = (log: LogEvent) => void;
 | 
				
			||||||
export type EventCallback<ArgsType> = EventCallbackSync<ArgsType>|EventCallbackAsync<ArgsType>;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
export type EventWatcherCallbackSync = (log: LogEvent) => void;
 | 
					 | 
				
			||||||
export type EventWatcherCallbackAsync = (log: LogEvent) => Promise<void>;
 | 
					 | 
				
			||||||
export type EventWatcherCallback = EventWatcherCallbackSync|EventWatcherCallbackAsync;
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
export interface ExchangeContract extends Web3.ContractInstance {
 | 
					export interface ExchangeContract extends Web3.ContractInstance {
 | 
				
			||||||
    isValidSignature: {
 | 
					    isValidSignature: {
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user