aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorFabio Berger <me@fabioberger.com>2017-11-10 04:13:56 +0800
committerFabio Berger <me@fabioberger.com>2017-11-10 04:13:56 +0800
commitc5dc89886df6210d6bb49772d35951773ed5c86a (patch)
tree9625d47475458fb44c878e1c308d4be6771eda4f /src
parent545cc0b026dbff64fadc7ba9e9e077e3a8371079 (diff)
parent41a0ce146da576b9bba180e5d51f2121032671fa (diff)
downloaddexon-sol-tools-c5dc89886df6210d6bb49772d35951773ed5c86a.tar
dexon-sol-tools-c5dc89886df6210d6bb49772d35951773ed5c86a.tar.gz
dexon-sol-tools-c5dc89886df6210d6bb49772d35951773ed5c86a.tar.bz2
dexon-sol-tools-c5dc89886df6210d6bb49772d35951773ed5c86a.tar.lz
dexon-sol-tools-c5dc89886df6210d6bb49772d35951773ed5c86a.tar.xz
dexon-sol-tools-c5dc89886df6210d6bb49772d35951773ed5c86a.tar.zst
dexon-sol-tools-c5dc89886df6210d6bb49772d35951773ed5c86a.zip
fix merge conflicts
Diffstat (limited to 'src')
-rw-r--r--src/mempool/order_state_watcher.ts11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/mempool/order_state_watcher.ts b/src/mempool/order_state_watcher.ts
index db44344a7..63e812054 100644
--- a/src/mempool/order_state_watcher.ts
+++ b/src/mempool/order_state_watcher.ts
@@ -62,11 +62,14 @@ export class OrderStateWatcher {
}
/**
* Removes an order from the orderStateWatcher
- * @param signedOrder The order you wish to stop watching.
+ * @param orderHash The orderHash of the order you wish to stop watching.
*/
- public removeOrder(signedOrder: SignedOrder): void {
- assert.doesConformToSchema('signedOrder', signedOrder, schemas.signedOrderSchema);
- const orderHash = ZeroEx.getOrderHashHex(signedOrder);
+ public removeOrder(orderHash: string): void {
+ assert.doesConformToSchema('orderHash', orderHash, schemas.orderHashSchema);
+ const signedOrder = this._orders[orderHash];
+ if (_.isUndefined(signedOrder)) {
+ return;
+ }
delete this._orders[orderHash];
this._dependentOrderHashes[signedOrder.maker][signedOrder.makerTokenAddress].delete(orderHash);
// We currently do not remove the maker/makerToken keys from the mapping when all orderHashes removed