diff options
author | August Skare <post@augustskare.no> | 2018-11-16 18:28:24 +0800 |
---|---|---|
committer | August Skare <post@augustskare.no> | 2018-11-16 18:28:24 +0800 |
commit | c08108144825c33d8db26053c1d2d41460b09359 (patch) | |
tree | 6f21ce1e6834e0130b0f6063a097014cc1cc671f /packages/order-watcher | |
parent | 54bd7df900316504e4403bc94cffd92930a6c763 (diff) | |
parent | cabb7432b9a6d4a5bb8da6fc7fe4522d24e4ece5 (diff) | |
download | dexon-0x-contracts-c08108144825c33d8db26053c1d2d41460b09359.tar.gz dexon-0x-contracts-c08108144825c33d8db26053c1d2d41460b09359.tar.zst dexon-0x-contracts-c08108144825c33d8db26053c1d2d41460b09359.zip |
Merge branch 'development' into dev-tools-pages
Diffstat (limited to 'packages/order-watcher')
-rw-r--r-- | packages/order-watcher/CHANGELOG.json | 18 | ||||
-rw-r--r-- | packages/order-watcher/CHANGELOG.md | 9 | ||||
-rw-r--r-- | packages/order-watcher/package.json | 24 | ||||
-rw-r--r-- | packages/order-watcher/src/order_watcher/dependent_order_hashes_tracker.ts | 7 |
4 files changed, 43 insertions, 15 deletions
diff --git a/packages/order-watcher/CHANGELOG.json b/packages/order-watcher/CHANGELOG.json index dbb4824fc..b4d7a1501 100644 --- a/packages/order-watcher/CHANGELOG.json +++ b/packages/order-watcher/CHANGELOG.json @@ -1,12 +1,28 @@ [ { + "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 + } + ], + "timestamp": 1542208198 + }, + { "version": "2.2.3", "changes": [ { "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" } - ] + ], + "timestamp": 1542134075 }, { "timestamp": 1542028948, diff --git a/packages/order-watcher/CHANGELOG.md b/packages/order-watcher/CHANGELOG.md index 1470b0e48..c7003f759 100644 --- a/packages/order-watcher/CHANGELOG.md +++ b/packages/order-watcher/CHANGELOG.md @@ -5,6 +5,15 @@ Edit the package's CHANGELOG.json file only. CHANGELOG +## v2.2.4 - _November 14, 2018_ + + * Fix the bug when order watcher was throwing an error on order removal when maker token was ZRX (#1259) + +## v2.2.3 - _November 13, 2018_ + + * Start jsonRpcRequestId at 1, not 0 as 0 breaks the web3.js websocket RPC provider (#1227) + * Fix the bug when order watcher was trying to convert undefined to an object in case of CancelUpTo event + ## v2.2.2 - _November 12, 2018_ * Dependencies updated diff --git a/packages/order-watcher/package.json b/packages/order-watcher/package.json index 6bb1ef485..af88a120e 100644 --- a/packages/order-watcher/package.json +++ b/packages/order-watcher/package.json @@ -1,6 +1,6 @@ { "name": "@0x/order-watcher", - "version": "2.2.2", + "version": "2.2.4", "description": "An order watcher daemon that watches for order validity", "keywords": [ "0x", @@ -33,8 +33,8 @@ "node": ">=6.0.0" }, "devDependencies": { - "@0x/dev-utils": "^1.0.15", - "@0x/migrations": "^2.0.2", + "@0x/dev-utils": "^1.0.17", + "@0x/migrations": "^2.0.4", "@0x/tslint-config": "^1.0.10", "@types/bintrees": "^1.0.2", "@types/lodash": "4.14.104", @@ -57,19 +57,19 @@ "typescript": "3.0.1" }, "dependencies": { - "@0x/abi-gen-wrappers": "^1.0.3", - "@0x/assert": "^1.0.16", - "@0x/base-contract": "^3.0.4", + "@0x/abi-gen-wrappers": "^1.0.5", + "@0x/assert": "^1.0.17", + "@0x/base-contract": "^3.0.6", "@0x/contract-addresses": "^1.1.0", "@0x/contract-artifacts": "^1.1.0", - "@0x/contract-wrappers": "^4.0.0", - "@0x/fill-scenarios": "^1.0.10", - "@0x/json-schemas": "^2.1.0", - "@0x/order-utils": "^3.0.0", + "@0x/contract-wrappers": "^4.0.2", + "@0x/fill-scenarios": "^1.0.12", + "@0x/json-schemas": "^2.1.1", + "@0x/order-utils": "^3.0.2", "@0x/types": "^1.2.1", "@0x/typescript-typings": "^3.0.4", - "@0x/utils": "^2.0.4", - "@0x/web3-wrapper": "^3.1.2", + "@0x/utils": "^2.0.5", + "@0x/web3-wrapper": "^3.1.4", "bintrees": "^1.0.2", "ethereum-types": "^1.1.2", "ethereumjs-blockstream": "6.0.0", 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..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 @@ -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[] { @@ -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[] { |