aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFabio Berger <me@fabioberger.com>2018-09-21 17:56:31 +0800
committerFabio Berger <me@fabioberger.com>2018-09-21 17:56:31 +0800
commit4e8ec2359d0f3842411d752fcfe966d540b10178 (patch)
tree5479924510e6955c5a1c3625b6a4f749c4d2c655
parentcbd72b6e3d72ba9a6e7c03bdb824949fdb08fcae (diff)
downloaddexon-sol-tools-4e8ec2359d0f3842411d752fcfe966d540b10178.tar
dexon-sol-tools-4e8ec2359d0f3842411d752fcfe966d540b10178.tar.gz
dexon-sol-tools-4e8ec2359d0f3842411d752fcfe966d540b10178.tar.bz2
dexon-sol-tools-4e8ec2359d0f3842411d752fcfe966d540b10178.tar.lz
dexon-sol-tools-4e8ec2359d0f3842411d752fcfe966d540b10178.tar.xz
dexon-sol-tools-4e8ec2359d0f3842411d752fcfe966d540b10178.tar.zst
dexon-sol-tools-4e8ec2359d0f3842411d752fcfe966d540b10178.zip
Also make sure the transactionReceipt contains a blockNumber when checking if a transaction has been mined.
-rw-r--r--packages/web3-wrapper/CHANGELOG.json9
-rw-r--r--packages/web3-wrapper/src/web3_wrapper.ts2
2 files changed, 10 insertions, 1 deletions
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,5 +1,14 @@
[
{
+ "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",
"changes": [
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),