Skip to content

Commit d0ce408

Browse files
authoredJul 19, 2022
🍇 Append revert string check receipt is defined (#756)
1 parent 3ac5546 commit d0ce408

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed
 

‎.changeset/rude-parents-share.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@ethereum-waffle/provider": patch
3+
---
4+
5+
Append revert string check transaction receipt is not null

‎waffle-provider/src/revertString.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ export const decodeRevertString = (callRevertError: any): string => {
6161
};
6262

6363
export const appendRevertString = async (etherProvider: providers.Web3Provider, receipt: any) => {
64-
if (parseInt(receipt.status) === 0) {
64+
if (receipt && parseInt(receipt.status) === 0) {
6565
log('Got transaction receipt of a failed transaction. Attempting to replay to obtain revert string.');
6666
try {
6767
const tx = await etherProvider.getTransaction(receipt.transactionHash);

0 commit comments

Comments
 (0)