diff options
author | Leonid Logvinov <logvinov.leon@gmail.com> | 2017-11-21 07:24:30 +0800 |
---|---|---|
committer | Leonid Logvinov <logvinov.leon@gmail.com> | 2017-11-21 07:24:30 +0800 |
commit | c4669013abe477e555745c10c16194d47f523f9e (patch) | |
tree | 33fd5e14a9c2dfd8f35bc19a0cefbcc4cc05c2f9 | |
parent | 3ad6020e192e73ce276cc090751cedf2036e6a06 (diff) | |
download | dexon-sol-tools-c4669013abe477e555745c10c16194d47f523f9e.tar dexon-sol-tools-c4669013abe477e555745c10c16194d47f523f9e.tar.gz dexon-sol-tools-c4669013abe477e555745c10c16194d47f523f9e.tar.bz2 dexon-sol-tools-c4669013abe477e555745c10c16194d47f523f9e.tar.lz dexon-sol-tools-c4669013abe477e555745c10c16194d47f523f9e.tar.xz dexon-sol-tools-c4669013abe477e555745c10c16194d47f523f9e.tar.zst dexon-sol-tools-c4669013abe477e555745c10c16194d47f523f9e.zip |
Check if transactionReceipt exists before normalizing it
-rw-r--r-- | packages/0x.js/src/web3_wrapper.ts | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/packages/0x.js/src/web3_wrapper.ts b/packages/0x.js/src/web3_wrapper.ts index c937f9288..12d7caaf8 100644 --- a/packages/0x.js/src/web3_wrapper.ts +++ b/packages/0x.js/src/web3_wrapper.ts @@ -39,7 +39,9 @@ export class Web3Wrapper { } public async getTransactionReceiptAsync(txHash: string): Promise<TransactionReceipt> { const transactionReceipt = await promisify(this.web3.eth.getTransactionReceipt)(txHash); - transactionReceipt.status = this.normalizeTxReceiptStatus(transactionReceipt.status); + if (!_.isNull(transactionReceipt)) { + transactionReceipt.status = this.normalizeTxReceiptStatus(transactionReceipt.status); + } return transactionReceipt; } public getCurrentProvider(): Web3.Provider { |