diff options
author | Steve Klebanoff <steve.klebanoff@gmail.com> | 2018-11-27 01:18:48 +0800 |
---|---|---|
committer | Steve Klebanoff <steve.klebanoff@gmail.com> | 2018-11-27 01:18:48 +0800 |
commit | 271adcdb7e3ecb9f88f05f36ffb71d2147bac292 (patch) | |
tree | 80d17771617e540908dd99e9cb63a737630aa37d /packages/web3-wrapper | |
parent | 717a3bce8cd0d4cb782918b3ad806f6c1bdb825e (diff) | |
parent | 6d565f4bff38b12515f4d8f0e29cdc223c12d1fb (diff) | |
download | dexon-sol-tools-271adcdb7e3ecb9f88f05f36ffb71d2147bac292.tar dexon-sol-tools-271adcdb7e3ecb9f88f05f36ffb71d2147bac292.tar.gz dexon-sol-tools-271adcdb7e3ecb9f88f05f36ffb71d2147bac292.tar.bz2 dexon-sol-tools-271adcdb7e3ecb9f88f05f36ffb71d2147bac292.tar.lz dexon-sol-tools-271adcdb7e3ecb9f88f05f36ffb71d2147bac292.tar.xz dexon-sol-tools-271adcdb7e3ecb9f88f05f36ffb71d2147bac292.tar.zst dexon-sol-tools-271adcdb7e3ecb9f88f05f36ffb71d2147bac292.zip |
Merge branch 'development' into feature/instant/rollbar-env
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), |