diff options
author | Leonid Logvinov <logvinov.leon@gmail.com> | 2017-11-13 09:02:54 +0800 |
---|---|---|
committer | Leonid Logvinov <logvinov.leon@gmail.com> | 2017-11-13 09:06:14 +0800 |
commit | 7ea0b138bc7a61037636eb5b4d2ad9b995a27f79 (patch) | |
tree | 9504c885a07c1786d746819971c6ad2bb1967d83 | |
parent | d73fb5a23c0e23eaec90aee0b563c06fa8f380d6 (diff) | |
download | dexon-0x-contracts-7ea0b138bc7a61037636eb5b4d2ad9b995a27f79.tar.gz dexon-0x-contracts-7ea0b138bc7a61037636eb5b4d2ad9b995a27f79.tar.zst dexon-0x-contracts-7ea0b138bc7a61037636eb5b4d2ad9b995a27f79.zip |
Remove unused code
-rw-r--r-- | package.json | 2 | ||||
-rw-r--r-- | src/order_watcher/order_state_watcher.ts | 3 | ||||
-rw-r--r-- | src/types.ts | 5 | ||||
-rw-r--r-- | test/order_state_watcher_test.ts | 2 | ||||
-rw-r--r-- | yarn.lock | 4 |
5 files changed, 6 insertions, 10 deletions
diff --git a/package.json b/package.json index e7e21bdce..9faaeb8c1 100644 --- a/package.json +++ b/package.json @@ -62,7 +62,7 @@ "chai-as-promised": "^7.1.0", "chai-as-promised-typescript-typings": "0.0.3", "chai-bignumber": "^2.0.1", - "chai-typescript-typings": "^0.0.0", + "chai-typescript-typings": "^0.0.1", "copyfiles": "^1.2.0", "coveralls": "^3.0.0", "dirty-chai": "^2.0.1", diff --git a/src/order_watcher/order_state_watcher.ts b/src/order_watcher/order_state_watcher.ts index b69540716..139f13fdf 100644 --- a/src/order_watcher/order_state_watcher.ts +++ b/src/order_watcher/order_state_watcher.ts @@ -63,12 +63,9 @@ export class OrderStateWatcher { web3Wrapper: Web3Wrapper, abiDecoder: AbiDecoder, token: TokenWrapper, exchange: ExchangeWrapper, config?: OrderStateWatcherConfig, ) { - this._orderByOrderHash = {}; this._abiDecoder = abiDecoder; this._web3Wrapper = web3Wrapper; - this._dependentOrderHashes = {}; const eventPollingIntervalMs = _.isUndefined(config) ? undefined : config.eventPollingIntervalMs; - const blockPollingIntervalMs = _.isUndefined(config) ? undefined : config.blockPollingIntervalMs; this._eventWatcher = new EventWatcher(web3Wrapper, eventPollingIntervalMs); this._balanceAndProxyAllowanceLazyStore = new BalanceAndProxyAllowanceLazyStore(token); this._orderFilledCancelledLazyStore = new OrderFilledCancelledLazyStore(exchange); diff --git a/src/types.ts b/src/types.ts index b34dbfb4e..fcfbdc92b 100644 --- a/src/types.ts +++ b/src/types.ts @@ -18,14 +18,11 @@ export enum ZeroExError { SubscriptionNotFound = 'SUBSCRIPTION_NOT_FOUND', SubscriptionAlreadyPresent = 'SUBSCRIPTION_ALREADY_PRESENT', TransactionMiningTimeout = 'TRANSACTION_MINING_TIMEOUT', - FailedToFetchLatestBlock = 'FAILED_TO_FETCH_LATEST_BLOCK', } export enum InternalZeroExError { NoAbiDecoder = 'NO_ABI_DECODER', ZrxNotInTokenRegistry = 'ZRX_NOT_IN_TOKEN_REGISTRY', - LatestBlockNumberNotSet = 'LATEST_BLOCK_NUMBER_NOT_SET', - Web3WrapperRequiredToStartBlockStore = 'WEB3_WRAPPER_REQUIRED_TO_START_BLOCK_STORE', } /** @@ -401,11 +398,9 @@ export interface JSONRPCPayload { /* * eventPollingIntervalMs: How often to poll the Ethereum node for new events - * blockPollingIntervalMs: How often to poll the Ethereum node for new blocks */ export interface OrderStateWatcherConfig { eventPollingIntervalMs?: number; - blockPollingIntervalMs?: number; } /* diff --git a/test/order_state_watcher_test.ts b/test/order_state_watcher_test.ts index aa387f495..2b1aa68b7 100644 --- a/test/order_state_watcher_test.ts +++ b/test/order_state_watcher_test.ts @@ -96,7 +96,7 @@ describe('OrderStateWatcher', () => { it('should fail when trying to subscribe twice', async () => { zeroEx.orderStateWatcher.subscribe(_.noop); expect(() => zeroEx.orderStateWatcher.subscribe(_.noop)) - .to.throw(); + .to.throw(ZeroExError.SubscriptionAlreadyPresent); }); }); describe('tests with cleanup', async () => { @@ -1041,6 +1041,10 @@ chai-typescript-typings@^0.0.0: version "0.0.0" resolved "https://registry.yarnpkg.com/chai-typescript-typings/-/chai-typescript-typings-0.0.0.tgz#52e076d72cf29129c94ab1dba6e33ce3828a0724" +chai-typescript-typings@^0.0.1: + version "0.0.1" + resolved "https://registry.yarnpkg.com/chai-typescript-typings/-/chai-typescript-typings-0.0.1.tgz#433dee303b0b2978ad0dd03129df0a5afb791274" + chai@^4.0.1: version "4.0.2" resolved "https://registry.yarnpkg.com/chai/-/chai-4.0.2.tgz#2f7327c4de6f385dd7787999e2ab02697a32b83b" |