From 4e8ec2359d0f3842411d752fcfe966d540b10178 Mon Sep 17 00:00:00 2001 From: Fabio Berger Date: Fri, 21 Sep 2018 10:56:31 +0100 Subject: Also make sure the transactionReceipt contains a blockNumber when checking if a transaction has been mined. --- packages/web3-wrapper/CHANGELOG.json | 9 +++++++++ packages/web3-wrapper/src/web3_wrapper.ts | 2 +- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/packages/web3-wrapper/CHANGELOG.json b/packages/web3-wrapper/CHANGELOG.json index 57e6f7689..e1fdede0e 100644 --- a/packages/web3-wrapper/CHANGELOG.json +++ b/packages/web3-wrapper/CHANGELOG.json @@ -1,4 +1,13 @@ [ + { + "version": "2.0.3", + "changes": [ + { + "note": + "Fixes issue #1076 where Parity now returns a placeholder transactionReceipt before the transaction is mined." + } + ] + }, { "timestamp": 1536142250, "version": "2.0.2", diff --git a/packages/web3-wrapper/src/web3_wrapper.ts b/packages/web3-wrapper/src/web3_wrapper.ts index ea78f8801..af0fe3a72 100644 --- a/packages/web3-wrapper/src/web3_wrapper.ts +++ b/packages/web3-wrapper/src/web3_wrapper.ts @@ -539,7 +539,7 @@ export class Web3Wrapper { } // Immediately check if the transaction has already been mined. let transactionReceipt = await this.getTransactionReceiptAsync(txHash); - if (!_.isNull(transactionReceipt)) { + if (!_.isNull(transactionReceipt) && !_.isNull(transactionReceipt.blockNumber)) { const logsWithDecodedArgs = _.map( transactionReceipt.logs, this.abiDecoder.tryToDecodeLogOrNoop.bind(this.abiDecoder), -- cgit From c10807c4e35a76a314f1c2e492a5c1410d30777e Mon Sep 17 00:00:00 2001 From: Fabio Berger Date: Fri, 21 Sep 2018 11:04:30 +0100 Subject: Add PR number --- packages/web3-wrapper/CHANGELOG.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/web3-wrapper/CHANGELOG.json b/packages/web3-wrapper/CHANGELOG.json index e1fdede0e..2b3c09ebc 100644 --- a/packages/web3-wrapper/CHANGELOG.json +++ b/packages/web3-wrapper/CHANGELOG.json @@ -4,7 +4,8 @@ "changes": [ { "note": - "Fixes issue #1076 where Parity now returns a placeholder transactionReceipt before the transaction is mined." + "Fixes issue #1076 where Parity now returns a placeholder transactionReceipt before the transaction is mined.", + "pr": 1079 } ] }, -- cgit