diff options
author | Leonid <logvinov.leon@gmail.com> | 2018-02-01 23:25:25 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-02-01 23:25:25 +0800 |
commit | 913930b561717e39ad02a689216d933d7c732945 (patch) | |
tree | 91b183826dcaff29e7bc25b00e3b5b4a9734879d /packages | |
parent | 994c8db1f3f9049130aafefa727be7ad4d8e7e12 (diff) | |
parent | 6811bdec404fccb9dcf10e6802671317159b6533 (diff) | |
download | dexon-sol-tools-913930b561717e39ad02a689216d933d7c732945.tar dexon-sol-tools-913930b561717e39ad02a689216d933d7c732945.tar.gz dexon-sol-tools-913930b561717e39ad02a689216d933d7c732945.tar.bz2 dexon-sol-tools-913930b561717e39ad02a689216d933d7c732945.tar.lz dexon-sol-tools-913930b561717e39ad02a689216d933d7c732945.tar.xz dexon-sol-tools-913930b561717e39ad02a689216d933d7c732945.tar.zst dexon-sol-tools-913930b561717e39ad02a689216d933d7c732945.zip |
Merge pull request #357 from ERCdEX/luke/zrx_order_watch_cache
BUGFIX: don't remove maker/zrx order from cache twice
Diffstat (limited to 'packages')
-rw-r--r-- | packages/0x.js/src/order_watcher/order_state_watcher.ts | 6 |
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); } /** |