diff options
author | Fabio Berger <me@fabioberger.com> | 2018-04-18 08:31:34 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-04-18 08:31:34 +0800 |
commit | a63dfb7995e90c330112557396a8523561fa231a (patch) | |
tree | edf8fadefd1e08c604580db4747a7c3fa4cc1967 /packages/0x.js/src | |
parent | bf4873e519762c6e13bb68c7a6757cc1ec25eb77 (diff) | |
parent | 3ffcb03d8791acefa25bb886384e79cfaabe88d6 (diff) | |
download | dexon-sol-tools-a63dfb7995e90c330112557396a8523561fa231a.tar dexon-sol-tools-a63dfb7995e90c330112557396a8523561fa231a.tar.gz dexon-sol-tools-a63dfb7995e90c330112557396a8523561fa231a.tar.bz2 dexon-sol-tools-a63dfb7995e90c330112557396a8523561fa231a.tar.lz dexon-sol-tools-a63dfb7995e90c330112557396a8523561fa231a.tar.xz dexon-sol-tools-a63dfb7995e90c330112557396a8523561fa231a.tar.zst dexon-sol-tools-a63dfb7995e90c330112557396a8523561fa231a.zip |
Merge pull request #527 from avonian/redundant_order_removal_bug
Fix redundant expired order removal bug
Diffstat (limited to 'packages/0x.js/src')
-rw-r--r-- | packages/0x.js/src/order_watcher/expiration_watcher.ts | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/packages/0x.js/src/order_watcher/expiration_watcher.ts b/packages/0x.js/src/order_watcher/expiration_watcher.ts index 00b62162d..8b306bf3b 100644 --- a/packages/0x.js/src/order_watcher/expiration_watcher.ts +++ b/packages/0x.js/src/order_watcher/expiration_watcher.ts @@ -48,6 +48,9 @@ export class ExpirationWatcher { this._orderHashByExpirationRBTree.insert(orderHash); } public removeOrder(orderHash: string): void { + if (_.isUndefined(this._expiration[orderHash])) { + return; // noop since order already removed + } this._orderHashByExpirationRBTree.remove(orderHash); delete this._expiration[orderHash]; } |