From 39b99c8aa2c9defc1cb3693f1be338b4fe3feedf Mon Sep 17 00:00:00 2001 From: Richard Moore Date: Tue, 27 Jun 2023 23:28:57 -0230 Subject: [PATCH] Wider error detection for call exceptions on certain backends (#4154, #4155). --- src.ts/providers/provider-jsonrpc.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src.ts/providers/provider-jsonrpc.ts b/src.ts/providers/provider-jsonrpc.ts index 0ba83704b7..dfb4c7a962 100644 --- a/src.ts/providers/provider-jsonrpc.ts +++ b/src.ts/providers/provider-jsonrpc.ts @@ -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 }; }