aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLeonid Logvinov <logvinov.leon@gmail.com>2018-11-14 02:27:44 +0800
committerLeonid Logvinov <logvinov.leon@gmail.com>2018-11-14 02:27:44 +0800
commit11f0bebd7faff1a8ff0636e6f1a7d79b7db26104 (patch)
treeadc75f0f9d81aa07bce1b667bf2a0e089f7ce627
parent3fb29041b0e6b874709eceac28505706e7929774 (diff)
downloaddexon-sol-tools-11f0bebd7faff1a8ff0636e6f1a7d79b7db26104.tar
dexon-sol-tools-11f0bebd7faff1a8ff0636e6f1a7d79b7db26104.tar.gz
dexon-sol-tools-11f0bebd7faff1a8ff0636e6f1a7d79b7db26104.tar.bz2
dexon-sol-tools-11f0bebd7faff1a8ff0636e6f1a7d79b7db26104.tar.lz
dexon-sol-tools-11f0bebd7faff1a8ff0636e6f1a7d79b7db26104.tar.xz
dexon-sol-tools-11f0bebd7faff1a8ff0636e6f1a7d79b7db26104.tar.zst
dexon-sol-tools-11f0bebd7faff1a8ff0636e6f1a7d79b7db26104.zip
Fix a bug when undefined was been tried to convert to an array
-rw-r--r--packages/order-watcher/CHANGELOG.json4
-rw-r--r--packages/order-watcher/src/order_watcher/dependent_order_hashes_tracker.ts2
2 files changed, 5 insertions, 1 deletions
diff --git a/packages/order-watcher/CHANGELOG.json b/packages/order-watcher/CHANGELOG.json
index dbb4824fc..c680ca935 100644
--- a/packages/order-watcher/CHANGELOG.json
+++ b/packages/order-watcher/CHANGELOG.json
@@ -5,6 +5,10 @@
{
"note": "Start jsonRpcRequestId at 1, not 0 as 0 breaks the web3.js websocket RPC provider",
"pr": 1227
+ },
+ {
+ "note":
+ "Fix the bug when order watcher was trying to convert undefined to an object in case of CancelUpTo event"
}
]
},
diff --git a/packages/order-watcher/src/order_watcher/dependent_order_hashes_tracker.ts b/packages/order-watcher/src/order_watcher/dependent_order_hashes_tracker.ts
index dbcc25186..1ec568a9b 100644
--- a/packages/order-watcher/src/order_watcher/dependent_order_hashes_tracker.ts
+++ b/packages/order-watcher/src/order_watcher/dependent_order_hashes_tracker.ts
@@ -50,7 +50,7 @@ export class DependentOrderHashesTracker {
return uniqueOrderHashList;
}
public getDependentOrderHashesByMaker(makerAddress: string): string[] {
- const dependentOrderHashes = Array.from(this._orderHashesByMakerAddress[makerAddress]);
+ const dependentOrderHashes = Array.from(this._orderHashesByMakerAddress[makerAddress] || {});
return dependentOrderHashes;
}
public getDependentOrderHashesByAssetDataByMaker(makerAddress: string, assetData: string): string[] {