Remove unused code
This commit is contained in:
@@ -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",
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user