aboutsummaryrefslogtreecommitdiffstats
path: root/packages/0x.js/src/order_watcher
diff options
context:
space:
mode:
authorLeonid Logvinov <logvinov.leon@gmail.com>2017-11-23 04:07:53 +0800
committerLeonid Logvinov <logvinov.leon@gmail.com>2017-11-24 05:13:37 +0800
commit87d34f9c7f3ccf22e01798c27c4a4d5d4f943816 (patch)
treee92510af5e9f1504acbfda424a59bf4facd0249d /packages/0x.js/src/order_watcher
parentd20926e150beed4785b31451a415bbf545f850be (diff)
downloaddexon-sol-tools-87d34f9c7f3ccf22e01798c27c4a4d5d4f943816.tar.gz
dexon-sol-tools-87d34f9c7f3ccf22e01798c27c4a4d5d4f943816.tar.zst
dexon-sol-tools-87d34f9c7f3ccf22e01798c27c4a4d5d4f943816.zip
Auto-fix linter errors
Diffstat (limited to 'packages/0x.js/src/order_watcher')
-rw-r--r--packages/0x.js/src/order_watcher/event_watcher.ts7
-rw-r--r--packages/0x.js/src/order_watcher/expiration_watcher.ts9
-rw-r--r--packages/0x.js/src/order_watcher/order_state_watcher.ts48
3 files changed, 34 insertions, 30 deletions
diff --git a/packages/0x.js/src/order_watcher/event_watcher.ts b/packages/0x.js/src/order_watcher/event_watcher.ts
index ecbab0cd5..831f19da5 100644
--- a/packages/0x.js/src/order_watcher/event_watcher.ts
+++ b/packages/0x.js/src/order_watcher/event_watcher.ts
@@ -1,6 +1,6 @@
-import * as Web3 from 'web3';
import * as _ from 'lodash';
-import {Web3Wrapper} from '../web3_wrapper';
+import * as Web3 from 'web3';
+
import {
BlockParamLiteral,
EventCallback,
@@ -8,9 +8,10 @@ import {
ZeroExError,
} from '../types';
import {AbiDecoder} from '../utils/abi_decoder';
-import {intervalUtils} from '../utils/interval_utils';
import {assert} from '../utils/assert';
+import {intervalUtils} from '../utils/interval_utils';
import {utils} from '../utils/utils';
+import {Web3Wrapper} from '../web3_wrapper';
const DEFAULT_EVENT_POLLING_INTERVAL_MS = 200;
diff --git a/packages/0x.js/src/order_watcher/expiration_watcher.ts b/packages/0x.js/src/order_watcher/expiration_watcher.ts
index 2ea7835d9..9a1bb1ca4 100644
--- a/packages/0x.js/src/order_watcher/expiration_watcher.ts
+++ b/packages/0x.js/src/order_watcher/expiration_watcher.ts
@@ -1,10 +1,11 @@
-import * as _ from 'lodash';
import {BigNumber} from 'bignumber.js';
import {RBTree} from 'bintrees';
-import {utils} from '../utils/utils';
-import {intervalUtils} from '../utils/interval_utils';
-import {SignedOrder, ZeroExError} from '../types';
+import * as _ from 'lodash';
+
import {ZeroEx} from '../0x';
+import {SignedOrder, ZeroExError} from '../types';
+import {intervalUtils} from '../utils/interval_utils';
+import {utils} from '../utils/utils';
const DEFAULT_EXPIRATION_MARGIN_MS = 0;
const DEFAULT_ORDER_EXPIRATION_CHECKING_INTERVAL_MS = 50;
diff --git a/packages/0x.js/src/order_watcher/order_state_watcher.ts b/packages/0x.js/src/order_watcher/order_state_watcher.ts
index 287172ff1..4d57935a1 100644
--- a/packages/0x.js/src/order_watcher/order_state_watcher.ts
+++ b/packages/0x.js/src/order_watcher/order_state_watcher.ts
@@ -1,37 +1,39 @@
-import * as _ from 'lodash';
import {schemas} from '@0xproject/json-schemas';
+import * as _ from 'lodash';
+
import {ZeroEx} from '../0x';
-import {EventWatcher} from './event_watcher';
-import {assert} from '../utils/assert';
-import {utils} from '../utils/utils';
import {artifacts} from '../artifacts';
-import {AbiDecoder} from '../utils/abi_decoder';
-import {intervalUtils} from '../utils/interval_utils';
-import {OrderStateUtils} from '../utils/order_state_utils';
+import {ExchangeWrapper} from '../contract_wrappers/exchange_wrapper';
+import {TokenWrapper} from '../contract_wrappers/token_wrapper';
+import {BalanceAndProxyAllowanceLazyStore} from '../stores/balance_proxy_allowance_lazy_store';
+import {OrderFilledCancelledLazyStore} from '../stores/order_filled_cancelled_lazy_store';
import {
- LogEvent,
- OrderState,
- SignedOrder,
- Web3Provider,
+ ApprovalContractEventArgs,
BlockParamLiteral,
- LogWithDecodedArgs,
ContractEventArgs,
+ ExchangeContractErrs,
+ ExchangeEvents,
+ LogCancelContractEventArgs,
+ LogEvent,
+ LogFillContractEventArgs,
+ LogWithDecodedArgs,
OnOrderStateChangeCallback,
+ OrderState,
OrderStateWatcherConfig,
- ApprovalContractEventArgs,
- TransferContractEventArgs,
- LogFillContractEventArgs,
- LogCancelContractEventArgs,
- ExchangeEvents,
+ SignedOrder,
TokenEvents,
+ TransferContractEventArgs,
+ Web3Provider,
ZeroExError,
- ExchangeContractErrs,
} from '../types';
+import {AbiDecoder} from '../utils/abi_decoder';
+import {assert} from '../utils/assert';
+import {intervalUtils} from '../utils/interval_utils';
+import {OrderStateUtils} from '../utils/order_state_utils';
+import {utils} from '../utils/utils';
import {Web3Wrapper} from '../web3_wrapper';
-import {TokenWrapper} from '../contract_wrappers/token_wrapper';
-import {ExchangeWrapper} from '../contract_wrappers/exchange_wrapper';
-import {OrderFilledCancelledLazyStore} from '../stores/order_filled_cancelled_lazy_store';
-import {BalanceAndProxyAllowanceLazyStore} from '../stores/balance_proxy_allowance_lazy_store';
+
+import {EventWatcher} from './event_watcher';
import {ExpirationWatcher} from './expiration_watcher';
interface DependentOrderHashes {
@@ -238,7 +240,7 @@ export class OrderStateWatcher {
}
private async _emitRevalidateOrdersAsync(orderHashes: string[]): Promise<void> {
for (const orderHash of orderHashes) {
- const signedOrder = this._orderByOrderHash[orderHash] as SignedOrder;
+ const signedOrder = this._orderByOrderHash[orderHash];
// Most of these calls will never reach the network because the data is fetched from stores
// and only updated when cache is invalidated
const orderState = await this._orderStateUtils.getOrderStateAsync(signedOrder);