aboutsummaryrefslogtreecommitdiffstats
path: root/packages/order-watcher
diff options
context:
space:
mode:
authorFabio Berger <me@fabioberger.com>2018-07-12 21:53:31 +0800
committerGitHub <noreply@github.com>2018-07-12 21:53:31 +0800
commita45a29432e722b71fcfc63a8545fa43ffc29b92d (patch)
tree84fbd6c8d1fb87fd1e36dabd808ce897e346ff8c /packages/order-watcher
parent34a903516439ec64073cfcb10cee87a9c4db902e (diff)
parent819d069edc6ff31f8f08231b5087b125b872cf97 (diff)
downloaddexon-sol-tools-a45a29432e722b71fcfc63a8545fa43ffc29b92d.tar
dexon-sol-tools-a45a29432e722b71fcfc63a8545fa43ffc29b92d.tar.gz
dexon-sol-tools-a45a29432e722b71fcfc63a8545fa43ffc29b92d.tar.bz2
dexon-sol-tools-a45a29432e722b71fcfc63a8545fa43ffc29b92d.tar.lz
dexon-sol-tools-a45a29432e722b71fcfc63a8545fa43ffc29b92d.tar.xz
dexon-sol-tools-a45a29432e722b71fcfc63a8545fa43ffc29b92d.tar.zst
dexon-sol-tools-a45a29432e722b71fcfc63a8545fa43ffc29b92d.zip
Merge pull request #863 from 0xProject/refactor/0x.js
Refactor 0x.js
Diffstat (limited to 'packages/order-watcher')
-rw-r--r--packages/order-watcher/src/order_watcher/order_watcher.ts6
1 files changed, 6 insertions, 0 deletions
diff --git a/packages/order-watcher/src/order_watcher/order_watcher.ts b/packages/order-watcher/src/order_watcher/order_watcher.ts
index 999c1c79e..b09ba8d9d 100644
--- a/packages/order-watcher/src/order_watcher/order_watcher.ts
+++ b/packages/order-watcher/src/order_watcher/order_watcher.ts
@@ -252,6 +252,7 @@ export class OrderWatcher {
switch (decodedLog.event) {
case TokenEvents.Approval: {
// Invalidate cache
+ // tslint:disable-next-line:no-unnecessary-type-assertion
const args = decodedLog.args as TokenApprovalEventArgs;
this._balanceAndProxyAllowanceLazyStore.deleteProxyAllowance(decodedLog.address, args._owner);
// Revalidate orders
@@ -268,6 +269,7 @@ export class OrderWatcher {
}
case TokenEvents.Transfer: {
// Invalidate cache
+ // tslint:disable-next-line:no-unnecessary-type-assertion
const args = decodedLog.args as TokenTransferEventArgs;
this._balanceAndProxyAllowanceLazyStore.deleteBalance(decodedLog.address, args._from);
this._balanceAndProxyAllowanceLazyStore.deleteBalance(decodedLog.address, args._to);
@@ -285,6 +287,7 @@ export class OrderWatcher {
}
case EtherTokenEvents.Deposit: {
// Invalidate cache
+ // tslint:disable-next-line:no-unnecessary-type-assertion
const args = decodedLog.args as EtherTokenDepositEventArgs;
this._balanceAndProxyAllowanceLazyStore.deleteBalance(decodedLog.address, args._owner);
// Revalidate orders
@@ -301,6 +304,7 @@ export class OrderWatcher {
}
case EtherTokenEvents.Withdrawal: {
// Invalidate cache
+ // tslint:disable-next-line:no-unnecessary-type-assertion
const args = decodedLog.args as EtherTokenWithdrawalEventArgs;
this._balanceAndProxyAllowanceLazyStore.deleteBalance(decodedLog.address, args._owner);
// Revalidate orders
@@ -317,6 +321,7 @@ export class OrderWatcher {
}
case ExchangeEvents.LogFill: {
// Invalidate cache
+ // tslint:disable-next-line:no-unnecessary-type-assertion
const args = decodedLog.args as ExchangeLogFillEventArgs;
this._orderFilledCancelledLazyStore.deleteFilledTakerAmount(args.orderHash);
// Revalidate orders
@@ -329,6 +334,7 @@ export class OrderWatcher {
}
case ExchangeEvents.LogCancel: {
// Invalidate cache
+ // tslint:disable-next-line:no-unnecessary-type-assertion
const args = decodedLog.args as ExchangeLogCancelEventArgs;
this._orderFilledCancelledLazyStore.deleteCancelledTakerAmount(args.orderHash);
// Revalidate orders