diff options
author | Fabio Berger <me@fabioberger.com> | 2018-11-26 23:08:57 +0800 |
---|---|---|
committer | Fabio Berger <me@fabioberger.com> | 2018-11-26 23:08:57 +0800 |
commit | 420a677828ed102b7980e9b18911885e0ecb08e8 (patch) | |
tree | 712034da6837333a4a584ced6866c1223541aa08 /packages/web3-wrapper/src/web3_wrapper.ts | |
parent | 9da43878b169226e628ad2ea834e0fab78d5909b (diff) | |
parent | 2648f5ba654ccc22d96a0755c0a24ef628054d02 (diff) | |
download | dexon-sol-tools-420a677828ed102b7980e9b18911885e0ecb08e8.tar dexon-sol-tools-420a677828ed102b7980e9b18911885e0ecb08e8.tar.gz dexon-sol-tools-420a677828ed102b7980e9b18911885e0ecb08e8.tar.bz2 dexon-sol-tools-420a677828ed102b7980e9b18911885e0ecb08e8.tar.lz dexon-sol-tools-420a677828ed102b7980e9b18911885e0ecb08e8.tar.xz dexon-sol-tools-420a677828ed102b7980e9b18911885e0ecb08e8.tar.zst dexon-sol-tools-420a677828ed102b7980e9b18911885e0ecb08e8.zip |
merge development
Diffstat (limited to 'packages/web3-wrapper/src/web3_wrapper.ts')
-rw-r--r-- | packages/web3-wrapper/src/web3_wrapper.ts | 7 |
1 files changed, 5 insertions, 2 deletions
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), |