From 707af1ec583dfbe76a8e240bd294689020fcd866 Mon Sep 17 00:00:00 2001 From: Fabio Berger Date: Wed, 21 Nov 2018 21:09:37 +0000 Subject: Updated CHANGELOGS --- packages/web3-wrapper/CHANGELOG.json | 3 ++- packages/web3-wrapper/CHANGELOG.md | 5 +++++ 2 files changed, 7 insertions(+), 1 deletion(-) (limited to 'packages/web3-wrapper') diff --git a/packages/web3-wrapper/CHANGELOG.json b/packages/web3-wrapper/CHANGELOG.json index cc65c2a7d..9725640ac 100644 --- a/packages/web3-wrapper/CHANGELOG.json +++ b/packages/web3-wrapper/CHANGELOG.json @@ -10,7 +10,8 @@ "note": "Return `undefined` instead of `null` if transaction receipt not found", "pr": 1291 } - ] + ], + "timestamp": 1542821676 }, { "timestamp": 1542208198, diff --git a/packages/web3-wrapper/CHANGELOG.md b/packages/web3-wrapper/CHANGELOG.md index 70a00ee1e..fa88eee2c 100644 --- a/packages/web3-wrapper/CHANGELOG.md +++ b/packages/web3-wrapper/CHANGELOG.md @@ -5,6 +5,11 @@ Edit the package's CHANGELOG.json file only. CHANGELOG +## v3.1.5 - _November 21, 2018_ + + * Add unmarshalling of transaction receipts (#1291) + * Return `undefined` instead of `null` if transaction receipt not found (#1291) + ## v3.1.4 - _November 14, 2018_ * Dependencies updated -- cgit From f46a49fd13c88dd86c9661d76bace18844642c04 Mon Sep 17 00:00:00 2001 From: Fabio Berger Date: Wed, 21 Nov 2018 21:09:47 +0000 Subject: Publish - 0x.js@2.0.5 - @0x/abi-gen@1.0.17 - @0x/abi-gen-wrappers@1.1.0 - @0x/assert@1.0.18 - @0x/asset-buyer@3.0.1 - @0x/base-contract@3.0.7 - @0x/connect@3.0.7 - @0x/contract-addresses@1.2.0 - @0x/contract-wrappers@4.1.0 - contracts@2.1.55 - @0x/dev-tools-pages@0.0.7 - @0x/dev-utils@1.0.18 - @0x/fill-scenarios@1.0.13 - @0x/instant@1.0.1 - @0x/json-schemas@2.1.2 - @0x/metacoin@0.0.29 - @0x/migrations@2.1.0 - @0x/monorepo-scripts@1.0.14 - @0x/order-utils@3.0.3 - @0x/order-watcher@2.2.5 - @0x/react-docs@1.0.19 - @0x/react-shared@1.0.22 - @0x/sol-compiler@1.1.13 - @0x/sol-cov@2.1.13 - @0x/sol-doc@1.0.8 - @0x/sol-resolver@1.0.17 - @0x/sra-spec@1.0.11 - @0x/subproviders@2.1.5 - @0x/testnet-faucets@1.0.57 - @0x/types@1.3.0 - @0x/utils@2.0.6 - @0x/web3-wrapper@3.1.5 - @0x/website@0.0.60 --- packages/web3-wrapper/package.json | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'packages/web3-wrapper') diff --git a/packages/web3-wrapper/package.json b/packages/web3-wrapper/package.json index 8d4d7ec35..2eba35da7 100644 --- a/packages/web3-wrapper/package.json +++ b/packages/web3-wrapper/package.json @@ -1,6 +1,6 @@ { "name": "@0x/web3-wrapper", - "version": "3.1.4", + "version": "3.1.5", "engines": { "node": ">=6.12" }, @@ -54,10 +54,10 @@ "typescript": "3.0.1" }, "dependencies": { - "@0x/assert": "^1.0.17", - "@0x/json-schemas": "^2.1.1", + "@0x/assert": "^1.0.18", + "@0x/json-schemas": "^2.1.2", "@0x/typescript-typings": "^3.0.4", - "@0x/utils": "^2.0.5", + "@0x/utils": "^2.0.6", "ethereum-types": "^1.1.2", "ethereumjs-util": "^5.1.1", "ethers": "~4.0.4", -- cgit From 03b3b80a657de864f020f605060b0dffd452b482 Mon Sep 17 00:00:00 2001 From: Jacob Evans Date: Fri, 23 Nov 2018 15:20:33 +1100 Subject: bug: Only unmarshall receipt if blockNumber present. https://github.com/paritytech/parity-ethereum/issues/1180 Parity can return a pending transaction receipt with a number of null values --- packages/web3-wrapper/CHANGELOG.json | 9 +++++++++ packages/web3-wrapper/src/web3_wrapper.ts | 7 +++++-- 2 files changed, 14 insertions(+), 2 deletions(-) (limited to 'packages/web3-wrapper') diff --git a/packages/web3-wrapper/CHANGELOG.json b/packages/web3-wrapper/CHANGELOG.json index 9725640ac..ad6902e33 100644 --- a/packages/web3-wrapper/CHANGELOG.json +++ b/packages/web3-wrapper/CHANGELOG.json @@ -1,4 +1,13 @@ [ + { + "version": "3.1.6", + "changes": [ + { + "note": "Unmarshall mined transaction receipts", + "pr": 1308 + } + ] + }, { "version": "3.1.5", "changes": [ diff --git a/packages/web3-wrapper/src/web3_wrapper.ts b/packages/web3-wrapper/src/web3_wrapper.ts index f1247e48a..76cae4b01 100644 --- a/packages/web3-wrapper/src/web3_wrapper.ts +++ b/packages/web3-wrapper/src/web3_wrapper.ts @@ -223,7 +223,10 @@ export class Web3Wrapper { method: 'eth_getTransactionReceipt', params: [txHash], }); - if (!_.isNull(transactionReceiptRpc)) { + // HACK Parity can return a pending transaction receipt. We check for a non null + // block number before continuing with returning a fully realised receipt. + // ref: https://github.com/paritytech/parity-ethereum/issues/1180 + if (!_.isNull(transactionReceiptRpc) && !_.isNull(transactionReceiptRpc.blockNumber)) { transactionReceiptRpc.status = Web3Wrapper._normalizeTxReceiptStatus(transactionReceiptRpc.status); const transactionReceipt = marshaller.unmarshalTransactionReceipt(transactionReceiptRpc); return transactionReceipt; @@ -577,7 +580,7 @@ export class Web3Wrapper { } // Immediately check if the transaction has already been mined. let transactionReceipt = await this.getTransactionReceiptIfExistsAsync(txHash); - if (!_.isUndefined(transactionReceipt) && !_.isNull(transactionReceipt.blockNumber)) { + if (!_.isUndefined(transactionReceipt)) { const logsWithDecodedArgs = _.map( transactionReceipt.logs, this.abiDecoder.tryToDecodeLogOrNoop.bind(this.abiDecoder), -- cgit