aboutsummaryrefslogtreecommitdiffstats
path: root/packages/0x.js
diff options
context:
space:
mode:
authorLuke Autry <lukeautry@gmail.com>2018-02-01 11:56:05 +0800
committerLuke Autry <lukeautry@gmail.com>2018-02-01 11:56:05 +0800
commit6811bdec404fccb9dcf10e6802671317159b6533 (patch)
treebab28651bd445ebcade6f4ee301b6d9c1251a25d /packages/0x.js
parent6682abf89dcdf566f05f8d88cb6af06c4bb1f6a2 (diff)
downloaddexon-sol-tools-6811bdec404fccb9dcf10e6802671317159b6533.tar.gz
dexon-sol-tools-6811bdec404fccb9dcf10e6802671317159b6533.tar.zst
dexon-sol-tools-6811bdec404fccb9dcf10e6802671317159b6533.zip
don't remove maker/zrx order from cache twice
Diffstat (limited to 'packages/0x.js')
-rw-r--r--packages/0x.js/src/order_watcher/order_state_watcher.ts6
1 files changed, 5 insertions, 1 deletions
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 576be00c8..c425c98ee 100644
--- a/packages/0x.js/src/order_watcher/order_state_watcher.ts
+++ b/packages/0x.js/src/order_watcher/order_state_watcher.ts
@@ -133,8 +133,12 @@ export class OrderStateWatcher {
delete this._orderStateByOrderHashCache[orderHash];
const exchange = (this._orderFilledCancelledLazyStore as any)._exchange as ExchangeWrapper;
const zrxTokenAddress = exchange.getZRXTokenAddress();
+
this._removeFromDependentOrderHashes(signedOrder.maker, zrxTokenAddress, orderHash);
- this._removeFromDependentOrderHashes(signedOrder.maker, signedOrder.makerTokenAddress, orderHash);
+ if (zrxTokenAddress !== signedOrder.makerTokenAddress) {
+ this.removeFromDependentOrderHashes(signedOrder.maker, signedOrder.makerTokenAddress, orderHash);
+ }
+
this._expirationWatcher.removeOrder(orderHash);
}
/**