Skip to content

Commit

Permalink
Wider error detection for call exceptions on certain backends (ethers…
Browse files Browse the repository at this point in the history
  • Loading branch information
ricmoo authored and Woodpile37 committed Jan 14, 2024
1 parent 23be259 commit 39b99c8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src.ts/providers/provider-jsonrpc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1165,7 +1165,7 @@ function spelunkData(value: any): null | { message: string, data: string } {
if (value == null) { return null; }

// These *are* the droids we're looking for.
if (typeof(value.message) === "string" && value.message.match("reverted") && isHexString(value.data)) {
if (typeof(value.message) === "string" && value.message.match(/revert/i) && isHexString(value.data)) {
return { message: value.message, data: value.data };
}

Expand Down

0 comments on commit 39b99c8

Please # to comment.