aboutsummaryrefslogtreecommitdiffstats
path: root/packages/order-watcher/src/order_watcher/order_watcher.ts
diff options
context:
space:
mode:
authorFabio Berger <me@fabioberger.com>2018-07-05 06:38:15 +0800
committerFabio Berger <me@fabioberger.com>2018-07-05 06:38:15 +0800
commita0b9c7777b2171456a19aa6ddcf2a023b663a816 (patch)
treeb9cf9fe6d0030bf0e2591d3facccf38ff2d622c6 /packages/order-watcher/src/order_watcher/order_watcher.ts
parent5204e4c08da7d32012047ee6ca4d898b0c45a47d (diff)
parent5176d929fa6d3c6ce414448ea2441bd450f04e3c (diff)
downloaddexon-sol-tools-a0b9c7777b2171456a19aa6ddcf2a023b663a816.tar
dexon-sol-tools-a0b9c7777b2171456a19aa6ddcf2a023b663a816.tar.gz
dexon-sol-tools-a0b9c7777b2171456a19aa6ddcf2a023b663a816.tar.bz2
dexon-sol-tools-a0b9c7777b2171456a19aa6ddcf2a023b663a816.tar.lz
dexon-sol-tools-a0b9c7777b2171456a19aa6ddcf2a023b663a816.tar.xz
dexon-sol-tools-a0b9c7777b2171456a19aa6ddcf2a023b663a816.tar.zst
dexon-sol-tools-a0b9c7777b2171456a19aa6ddcf2a023b663a816.zip
merge v2-prototype
Diffstat (limited to 'packages/order-watcher/src/order_watcher/order_watcher.ts')
-rw-r--r--packages/order-watcher/src/order_watcher/order_watcher.ts14
1 files changed, 7 insertions, 7 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..0ee56592e 100644
--- a/packages/order-watcher/src/order_watcher/order_watcher.ts
+++ b/packages/order-watcher/src/order_watcher/order_watcher.ts
@@ -1,7 +1,10 @@
import {
BalanceAndProxyAllowanceLazyStore,
ContractWrappers,
+ LogCancelContractEventArgs,
+ LogFillContractEventArgs,
OrderFilledCancelledLazyStore,
+ WithdrawalContractEventArgs,
} from '@0xproject/contract-wrappers';
import { schemas } from '@0xproject/json-schemas';
import { getOrderHashHex, OrderStateUtils } from '@0xproject/order-utils';
@@ -23,14 +26,8 @@ import {
DepositContractEventArgs,
EtherTokenContractEventArgs,
EtherTokenEvents,
- WithdrawalContractEventArgs,
} from '../generated_contract_wrappers/ether_token';
-import {
- ExchangeContractEventArgs,
- ExchangeEvents,
- LogCancelContractEventArgs,
- LogFillContractEventArgs,
-} from '../generated_contract_wrappers/exchange';
+import { ExchangeContractEventArgs, ExchangeEvents } from '../generated_contract_wrappers/exchange';
import {
ApprovalContractEventArgs,
TokenContractEventArgs,
@@ -301,6 +298,7 @@ export class OrderWatcher {
}
case EtherTokenEvents.Withdrawal: {
// Invalidate cache
+ // tslint:disable-next-line:no-unnecessary-type-assertion
const args = decodedLog.args as WithdrawalContractEventArgs;
this._balanceAndProxyAllowanceLazyStore.deleteBalance(decodedLog.address, args._owner);
// Revalidate orders
@@ -317,6 +315,7 @@ export class OrderWatcher {
}
case ExchangeEvents.LogFill: {
// Invalidate cache
+ // tslint:disable-next-line:no-unnecessary-type-assertion
const args = decodedLog.args as LogFillContractEventArgs;
this._orderFilledCancelledLazyStore.deleteFilledTakerAmount(args.orderHash);
// Revalidate orders
@@ -329,6 +328,7 @@ export class OrderWatcher {
}
case ExchangeEvents.LogCancel: {
// Invalidate cache
+ // tslint:disable-next-line:no-unnecessary-type-assertion
const args = decodedLog.args as LogCancelContractEventArgs;
this._orderFilledCancelledLazyStore.deleteCancelledTakerAmount(args.orderHash);
// Revalidate orders