diff options
author | Fabio Berger <me@fabioberger.com> | 2018-06-26 04:58:36 +0800 |
---|---|---|
committer | Fabio Berger <me@fabioberger.com> | 2018-06-26 04:58:36 +0800 |
commit | 87d66ccf6cad43b58a3064dcc3a7e66eced84f66 (patch) | |
tree | e563679842c266ddcc4492af6054dbd22f94dd18 /packages/order-watcher | |
parent | 7ce1e9b18d30cb76dd61f3859164cb09d091a3dd (diff) | |
download | dexon-0x-contracts-87d66ccf6cad43b58a3064dcc3a7e66eced84f66.tar dexon-0x-contracts-87d66ccf6cad43b58a3064dcc3a7e66eced84f66.tar.gz dexon-0x-contracts-87d66ccf6cad43b58a3064dcc3a7e66eced84f66.tar.bz2 dexon-0x-contracts-87d66ccf6cad43b58a3064dcc3a7e66eced84f66.tar.lz dexon-0x-contracts-87d66ccf6cad43b58a3064dcc3a7e66eced84f66.tar.xz dexon-0x-contracts-87d66ccf6cad43b58a3064dcc3a7e66eced84f66.tar.zst dexon-0x-contracts-87d66ccf6cad43b58a3064dcc3a7e66eced84f66.zip |
Fix Tslint issues
Diffstat (limited to 'packages/order-watcher')
-rw-r--r-- | packages/order-watcher/src/order_watcher/order_watcher.ts | 33 |
1 files changed, 9 insertions, 24 deletions
diff --git a/packages/order-watcher/src/order_watcher/order_watcher.ts b/packages/order-watcher/src/order_watcher/order_watcher.ts index 140aa341b..d0acf2e6b 100644 --- a/packages/order-watcher/src/order_watcher/order_watcher.ts +++ b/packages/order-watcher/src/order_watcher/order_watcher.ts @@ -19,24 +19,9 @@ import { Web3Wrapper } from '@0xproject/web3-wrapper'; import * as _ from 'lodash'; import { artifacts } from '../artifacts'; -import { - DepositContractEventArgs, - EtherTokenContractEventArgs, - EtherTokenEvents, - WithdrawalContractEventArgs, -} from '../generated_contract_wrappers/ether_token'; -import { - ExchangeContractEventArgs, - ExchangeEvents, - LogCancelContractEventArgs, - LogFillContractEventArgs, -} from '../generated_contract_wrappers/exchange'; -import { - ApprovalContractEventArgs, - TokenContractEventArgs, - TokenEvents, - TransferContractEventArgs, -} from '../generated_contract_wrappers/token'; +import { EtherTokenContractEventArgs, EtherTokenEvents } from '../generated_contract_wrappers/ether_token'; +import { ExchangeContractEventArgs, ExchangeEvents } from '../generated_contract_wrappers/exchange'; +import { TokenContractEventArgs, TokenEvents } from '../generated_contract_wrappers/token'; import { OnOrderStateChangeCallback, OrderWatcherConfig, OrderWatcherError } from '../types'; import { assert } from '../utils/assert'; @@ -252,7 +237,7 @@ export class OrderWatcher { switch (decodedLog.event) { case TokenEvents.Approval: { // Invalidate cache - const args = decodedLog.args as ApprovalContractEventArgs; + const args = decodedLog.args; this._balanceAndProxyAllowanceLazyStore.deleteProxyAllowance(decodedLog.address, args._owner); // Revalidate orders makerToken = decodedLog.address; @@ -268,7 +253,7 @@ export class OrderWatcher { } case TokenEvents.Transfer: { // Invalidate cache - const args = decodedLog.args as TransferContractEventArgs; + const args = decodedLog.args; this._balanceAndProxyAllowanceLazyStore.deleteBalance(decodedLog.address, args._from); this._balanceAndProxyAllowanceLazyStore.deleteBalance(decodedLog.address, args._to); // Revalidate orders @@ -285,7 +270,7 @@ export class OrderWatcher { } case EtherTokenEvents.Deposit: { // Invalidate cache - const args = decodedLog.args as DepositContractEventArgs; + const args = decodedLog.args; this._balanceAndProxyAllowanceLazyStore.deleteBalance(decodedLog.address, args._owner); // Revalidate orders makerToken = decodedLog.address; @@ -301,7 +286,7 @@ export class OrderWatcher { } case EtherTokenEvents.Withdrawal: { // Invalidate cache - const args = decodedLog.args as WithdrawalContractEventArgs; + const args = decodedLog.args; this._balanceAndProxyAllowanceLazyStore.deleteBalance(decodedLog.address, args._owner); // Revalidate orders makerToken = decodedLog.address; @@ -317,7 +302,7 @@ export class OrderWatcher { } case ExchangeEvents.LogFill: { // Invalidate cache - const args = decodedLog.args as LogFillContractEventArgs; + const args = decodedLog.args; this._orderFilledCancelledLazyStore.deleteFilledTakerAmount(args.orderHash); // Revalidate orders const orderHash = args.orderHash; @@ -329,7 +314,7 @@ export class OrderWatcher { } case ExchangeEvents.LogCancel: { // Invalidate cache - const args = decodedLog.args as LogCancelContractEventArgs; + const args = decodedLog.args; this._orderFilledCancelledLazyStore.deleteCancelledTakerAmount(args.orderHash); // Revalidate orders const orderHash = args.orderHash; |