aboutsummaryrefslogtreecommitdiffstats
path: root/packages/order-watcher
diff options
context:
space:
mode:
authorLeonid Logvinov <logvinov.leon@gmail.com>2018-11-14 23:04:25 +0800
committerGitHub <noreply@github.com>2018-11-14 23:04:25 +0800
commit06dcf244963ce4365cf0587423f29b3af37d82c1 (patch)
treeba008be8f9a8221976cb780ee3bf6cd72afcdc62 /packages/order-watcher
parent4fc457b78b30e761164eac26fe5f1ebcddd11f7d (diff)
parent77c77631e1d11b7a331ecc6ec73cce82ef1eb0b4 (diff)
downloaddexon-sol-tools-06dcf244963ce4365cf0587423f29b3af37d82c1.tar
dexon-sol-tools-06dcf244963ce4365cf0587423f29b3af37d82c1.tar.gz
dexon-sol-tools-06dcf244963ce4365cf0587423f29b3af37d82c1.tar.bz2
dexon-sol-tools-06dcf244963ce4365cf0587423f29b3af37d82c1.tar.lz
dexon-sol-tools-06dcf244963ce4365cf0587423f29b3af37d82c1.tar.xz
dexon-sol-tools-06dcf244963ce4365cf0587423f29b3af37d82c1.tar.zst
dexon-sol-tools-06dcf244963ce4365cf0587423f29b3af37d82c1.zip
Merge pull request #1259 from 0xProject/feature/ow-zrx-bug
[@0x/order-watcher] Fix a bug in an order removal when maker token is ZRX
Diffstat (limited to 'packages/order-watcher')
-rw-r--r--packages/order-watcher/CHANGELOG.json10
-rw-r--r--packages/order-watcher/src/order_watcher/dependent_order_hashes_tracker.ts5
2 files changed, 14 insertions, 1 deletions
diff --git a/packages/order-watcher/CHANGELOG.json b/packages/order-watcher/CHANGELOG.json
index 7119d7953..fd6167bd4 100644
--- a/packages/order-watcher/CHANGELOG.json
+++ b/packages/order-watcher/CHANGELOG.json
@@ -1,5 +1,15 @@
[
{
+ "version": "2.2.4",
+ "changes": [
+ {
+ "note":
+ "Fix the bug when order watcher was throwing an error on order removal when maker token was ZRX",
+ "pr": 1259
+ }
+ ]
+ },
+ {
"version": "2.2.3",
"changes": [
{
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 1ec568a9b..a956a94db 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
@@ -89,7 +89,10 @@ export class DependentOrderHashesTracker {
(decodedMakerAssetData as ERC721AssetData).tokenId,
);
}
- this._removeFromERC20DependentOrderhashes(signedOrder, this._zrxTokenAddress);
+ // If makerToken === ZRX then we already removed it and we don't need to remove it again.
+ if ((decodedMakerAssetData as ERC20AssetData).tokenAddress !== this._zrxTokenAddress) {
+ this._removeFromERC20DependentOrderhashes(signedOrder, this._zrxTokenAddress);
+ }
this._removeFromMakerDependentOrderhashes(signedOrder);
}
private _getDependentOrderHashesByERC20AssetData(makerAddress: string, erc20AssetData: string): string[] {