Fixes per converstaion, stats interface to pub
This commit is contained in:
		@@ -3,10 +3,10 @@
 | 
				
			|||||||
        "version": "2.1.2",
 | 
					        "version": "2.1.2",
 | 
				
			||||||
        "changes": [
 | 
					        "changes": [
 | 
				
			||||||
            {
 | 
					            {
 | 
				
			||||||
                "note": "Added getStats function and returns a Stats object"
 | 
					                "note": "Added getStats function and returns a Stats object",
 | 
				
			||||||
 | 
					                "pr": 1118
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
        ],
 | 
					        ]
 | 
				
			||||||
        "timestamp": 1538836030
 | 
					 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
        "version": "2.1.1",
 | 
					        "version": "2.1.1",
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -30,7 +30,7 @@ import {
 | 
				
			|||||||
    orderHashUtils,
 | 
					    orderHashUtils,
 | 
				
			||||||
    OrderStateUtils,
 | 
					    OrderStateUtils,
 | 
				
			||||||
} from '@0xproject/order-utils';
 | 
					} from '@0xproject/order-utils';
 | 
				
			||||||
import { AssetProxyId, ExchangeContractErrs, OrderState, SignedOrder } from '@0xproject/types';
 | 
					import { AssetProxyId, ExchangeContractErrs, OrderState, SignedOrder, Stats } from '@0xproject/types';
 | 
				
			||||||
import { errorUtils, intervalUtils } from '@0xproject/utils';
 | 
					import { errorUtils, intervalUtils } from '@0xproject/utils';
 | 
				
			||||||
import { BlockParamLiteral, LogEntryEvent, LogWithDecodedArgs, Provider } from 'ethereum-types';
 | 
					import { BlockParamLiteral, LogEntryEvent, LogWithDecodedArgs, Provider } from 'ethereum-types';
 | 
				
			||||||
import * as _ from 'lodash';
 | 
					import * as _ from 'lodash';
 | 
				
			||||||
@@ -57,10 +57,6 @@ interface OrderStateByOrderHash {
 | 
				
			|||||||
    [orderHash: string]: OrderState;
 | 
					    [orderHash: string]: OrderState;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
export interface Stats {
 | 
					 | 
				
			||||||
    orderCount: number;
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
const DEFAULT_ORDER_WATCHER_CONFIG: OrderWatcherConfig = {
 | 
					const DEFAULT_ORDER_WATCHER_CONFIG: OrderWatcherConfig = {
 | 
				
			||||||
    orderExpirationCheckingIntervalMs: 50,
 | 
					    orderExpirationCheckingIntervalMs: 50,
 | 
				
			||||||
    eventPollingIntervalMs: 200,
 | 
					    eventPollingIntervalMs: 200,
 | 
				
			||||||
@@ -222,7 +218,7 @@ export class OrderWatcher {
 | 
				
			|||||||
     */
 | 
					     */
 | 
				
			||||||
    public getStats(): Stats {
 | 
					    public getStats(): Stats {
 | 
				
			||||||
        return {
 | 
					        return {
 | 
				
			||||||
            orderCount : _.size(this._orderByOrderHash),
 | 
					            orderCount: _.size(this._orderByOrderHash),
 | 
				
			||||||
        };
 | 
					        };
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
    private async _cleanupAsync(): Promise<void> {
 | 
					    private async _cleanupAsync(): Promise<void> {
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -599,3 +599,7 @@ export interface Metadata {
 | 
				
			|||||||
    externalTypeToLink: ExternalTypeToLink;
 | 
					    externalTypeToLink: ExternalTypeToLink;
 | 
				
			||||||
    externalExportToLink: ExternalExportToLink;
 | 
					    externalExportToLink: ExternalExportToLink;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					export interface Stats {
 | 
				
			||||||
 | 
					    orderCount: number;
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user