aboutsummaryrefslogtreecommitdiffstats
path: root/packages/0x.js/src/order_watcher/expiration_watcher.ts
diff options
context:
space:
mode:
authorAra Kevonian <ara@dextroid.io>2018-04-17 22:42:43 +0800
committerAra Kevonian <ara@dextroid.io>2018-04-17 22:42:43 +0800
commit33b08b90a3a2ea076740f2ff7c386d3ccb76dfe2 (patch)
treee130b6654ec26c850cd1aa11f18a1e39f1d30c0a /packages/0x.js/src/order_watcher/expiration_watcher.ts
parentcbca2061f7f0e2632d5c74be62328d9e49dd822e (diff)
downloaddexon-sol-tools-33b08b90a3a2ea076740f2ff7c386d3ccb76dfe2.tar
dexon-sol-tools-33b08b90a3a2ea076740f2ff7c386d3ccb76dfe2.tar.gz
dexon-sol-tools-33b08b90a3a2ea076740f2ff7c386d3ccb76dfe2.tar.bz2
dexon-sol-tools-33b08b90a3a2ea076740f2ff7c386d3ccb76dfe2.tar.lz
dexon-sol-tools-33b08b90a3a2ea076740f2ff7c386d3ccb76dfe2.tar.xz
dexon-sol-tools-33b08b90a3a2ea076740f2ff7c386d3ccb76dfe2.tar.zst
dexon-sol-tools-33b08b90a3a2ea076740f2ff7c386d3ccb76dfe2.zip
Revert removeOrder flag in favor of noop
Diffstat (limited to 'packages/0x.js/src/order_watcher/expiration_watcher.ts')
-rw-r--r--packages/0x.js/src/order_watcher/expiration_watcher.ts3
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];
}