aboutsummaryrefslogtreecommitdiffstats
path: root/packages
diff options
context:
space:
mode:
authoramaurer <git@maurer.me>2018-10-12 23:55:31 +0800
committeramaurer <git@maurer.me>2018-10-12 23:55:31 +0800
commitcd04a21e29cc5713c1932b754d9a8f5c5172f960 (patch)
tree80a52e079aee4f82a1983c1e09416829bada5d97 /packages
parente5192507ab6597a93c45526cca092896641610f0 (diff)
downloaddexon-0x-contracts-cd04a21e29cc5713c1932b754d9a8f5c5172f960.tar
dexon-0x-contracts-cd04a21e29cc5713c1932b754d9a8f5c5172f960.tar.gz
dexon-0x-contracts-cd04a21e29cc5713c1932b754d9a8f5c5172f960.tar.bz2
dexon-0x-contracts-cd04a21e29cc5713c1932b754d9a8f5c5172f960.tar.lz
dexon-0x-contracts-cd04a21e29cc5713c1932b754d9a8f5c5172f960.tar.xz
dexon-0x-contracts-cd04a21e29cc5713c1932b754d9a8f5c5172f960.tar.zst
dexon-0x-contracts-cd04a21e29cc5713c1932b754d9a8f5c5172f960.zip
Fixes per converstaion, stats interface to pub
Diffstat (limited to 'packages')
-rw-r--r--packages/order-watcher/CHANGELOG.json6
-rw-r--r--packages/order-watcher/src/order_watcher/order_watcher.ts8
-rw-r--r--packages/types/src/index.ts4
3 files changed, 9 insertions, 9 deletions
diff --git a/packages/order-watcher/CHANGELOG.json b/packages/order-watcher/CHANGELOG.json
index 7b8416428..feebb9d69 100644
--- a/packages/order-watcher/CHANGELOG.json
+++ b/packages/order-watcher/CHANGELOG.json
@@ -3,10 +3,10 @@
"version": "2.1.2",
"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",
diff --git a/packages/order-watcher/src/order_watcher/order_watcher.ts b/packages/order-watcher/src/order_watcher/order_watcher.ts
index 4401b3f7e..eb37bd617 100644
--- a/packages/order-watcher/src/order_watcher/order_watcher.ts
+++ b/packages/order-watcher/src/order_watcher/order_watcher.ts
@@ -30,7 +30,7 @@ import {
orderHashUtils,
OrderStateUtils,
} 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 { BlockParamLiteral, LogEntryEvent, LogWithDecodedArgs, Provider } from 'ethereum-types';
import * as _ from 'lodash';
@@ -57,10 +57,6 @@ interface OrderStateByOrderHash {
[orderHash: string]: OrderState;
}
-export interface Stats {
- orderCount: number;
-}
-
const DEFAULT_ORDER_WATCHER_CONFIG: OrderWatcherConfig = {
orderExpirationCheckingIntervalMs: 50,
eventPollingIntervalMs: 200,
@@ -222,7 +218,7 @@ export class OrderWatcher {
*/
public getStats(): Stats {
return {
- orderCount : _.size(this._orderByOrderHash),
+ orderCount: _.size(this._orderByOrderHash),
};
}
private async _cleanupAsync(): Promise<void> {
diff --git a/packages/types/src/index.ts b/packages/types/src/index.ts
index 3ae0536d5..6f539fc1f 100644
--- a/packages/types/src/index.ts
+++ b/packages/types/src/index.ts
@@ -599,3 +599,7 @@ export interface Metadata {
externalTypeToLink: ExternalTypeToLink;
externalExportToLink: ExternalExportToLink;
}
+
+export interface Stats {
+ orderCount: number;
+}