Skip to content

Commit

Permalink
🍇 Append revert string check receipt is defined (#756)
Browse files Browse the repository at this point in the history
  • Loading branch information
yivlad committed Jul 19, 2022
1 parent 3ac5546 commit d0ce408
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/rude-parents-share.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@ethereum-waffle/provider": patch
---

Append revert string check transaction receipt is not null
2 changes: 1 addition & 1 deletion waffle-provider/src/revertString.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ export const decodeRevertString = (callRevertError: any): string => {
};

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

0 comments on commit d0ce408

Please sign in to comment.