aboutsummaryrefslogtreecommitdiffstats
path: root/packages/web3-wrapper
diff options
context:
space:
mode:
authorSteve Klebanoff <steve.klebanoff@gmail.com>2018-11-27 01:02:16 +0800
committerSteve Klebanoff <steve.klebanoff@gmail.com>2018-11-27 01:02:16 +0800
commit1494a70badaafbd0a52f63dae6f26232cf556526 (patch)
tree512f3c32224031992eb9380ebcf664cc4292b99e /packages/web3-wrapper
parentd750225554a0c4c317863cf11a7db5b1570e5b41 (diff)
parent6d565f4bff38b12515f4d8f0e29cdc223c12d1fb (diff)
downloaddexon-sol-tools-1494a70badaafbd0a52f63dae6f26232cf556526.tar
dexon-sol-tools-1494a70badaafbd0a52f63dae6f26232cf556526.tar.gz
dexon-sol-tools-1494a70badaafbd0a52f63dae6f26232cf556526.tar.bz2
dexon-sol-tools-1494a70badaafbd0a52f63dae6f26232cf556526.tar.lz
dexon-sol-tools-1494a70badaafbd0a52f63dae6f26232cf556526.tar.xz
dexon-sol-tools-1494a70badaafbd0a52f63dae6f26232cf556526.tar.zst
dexon-sol-tools-1494a70badaafbd0a52f63dae6f26232cf556526.zip
Merge branch 'development' into feature/instant/open-close-events
Diffstat (limited to 'packages/web3-wrapper')
-rw-r--r--packages/web3-wrapper/CHANGELOG.json12
-rw-r--r--packages/web3-wrapper/CHANGELOG.md5
-rw-r--r--packages/web3-wrapper/package.json8
-rw-r--r--packages/web3-wrapper/src/web3_wrapper.ts7
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),