Also make sure the transactionReceipt contains a blockNumber when checking if a transaction has been mined.

This commit is contained in:
Fabio Berger
2018-09-21 10:56:31 +01:00
parent cbd72b6e3d
commit 4e8ec2359d
2 changed files with 10 additions and 1 deletions

View File

@@ -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",

View File

@@ -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),