diff options
author | Fred Carlsen <fred@sjelfull.no> | 2018-11-27 23:19:36 +0800 |
---|---|---|
committer | Fred Carlsen <fred@sjelfull.no> | 2018-11-27 23:19:36 +0800 |
commit | 9b0020a884bdb98f9da434878fec171ab533ba7e (patch) | |
tree | ca285eb7dfd2c68f781b8b74d409fb69665a58dc /packages/web3-wrapper | |
parent | ec12e46e3f52ebb44338c113cecd073979821fae (diff) | |
parent | fdc4a4e5fa31d8797abf6313f4488147853ed77e (diff) | |
download | dexon-0x-contracts-9b0020a884bdb98f9da434878fec171ab533ba7e.tar.gz dexon-0x-contracts-9b0020a884bdb98f9da434878fec171ab533ba7e.tar.zst dexon-0x-contracts-9b0020a884bdb98f9da434878fec171ab533ba7e.zip |
Merge remote-tracking branch 'upstream/development' into website
Diffstat (limited to 'packages/web3-wrapper')
-rw-r--r-- | packages/web3-wrapper/CHANGELOG.json | 12 | ||||
-rw-r--r-- | packages/web3-wrapper/CHANGELOG.md | 5 | ||||
-rw-r--r-- | packages/web3-wrapper/package.json | 8 | ||||
-rw-r--r-- | packages/web3-wrapper/src/web3_wrapper.ts | 7 |
4 files changed, 25 insertions, 7 deletions
diff --git a/packages/web3-wrapper/CHANGELOG.json b/packages/web3-wrapper/CHANGELOG.json index cc65c2a7d..ad6902e33 100644 --- a/packages/web3-wrapper/CHANGELOG.json +++ b/packages/web3-wrapper/CHANGELOG.json @@ -1,5 +1,14 @@ [ { + "version": "3.1.6", + "changes": [ + { + "note": "Unmarshall mined transaction receipts", + "pr": 1308 + } + ] + }, + { "version": "3.1.5", "changes": [ { @@ -10,7 +19,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 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", 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), |