From 5e56949d0899e0a45964bc4caf274b40463da32b Mon Sep 17 00:00:00 2001 From: mous <97399882+mouseless0x@users.noreply.github.com> Date: Wed, 23 Oct 2024 16:13:58 +0100 Subject: [PATCH] =?UTF-8?q?throw=20both=20reason=20and=20inner=20when=20si?= =?UTF-8?q?mulation=20fails=20due=20to=20failedOpWith=E2=80=A6=20(#340)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * throw both reason and inner when simulation fails due to failedOpWithRevert * remove semi colon --------- Co-authored-by: mouseless <97399882+mouseless-eth@users.noreply.github.com> --- src/rpc/estimation/gasEstimationsV07.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/rpc/estimation/gasEstimationsV07.ts b/src/rpc/estimation/gasEstimationsV07.ts index 9ec3ec61..7b12ca4a 100644 --- a/src/rpc/estimation/gasEstimationsV07.ts +++ b/src/rpc/estimation/gasEstimationsV07.ts @@ -645,7 +645,9 @@ function getSimulateHandleOpResult(data: Hex): SimulateHandleOpResult { ) { return { result: "failed", - data: parseFailedOpWithRevert(decodedError.args?.[2] as Hex), + data: `${decodedError.args[1]} ${parseFailedOpWithRevert( + decodedError.args?.[2] as Hex + )}`, code: ValidationErrors.SimulateValidation } as const }