Skip to content

Commit

Permalink
throw both reason and inner when simulation fails due to failedOpWith… (
Browse files Browse the repository at this point in the history
#340)

* throw both reason and inner when simulation fails due to failedOpWithRevert

* remove semi colon

---------

Co-authored-by: mouseless <[email protected]>
  • Loading branch information
mouseless0x and mouseless0x authored Oct 23, 2024
1 parent 833e695 commit 5e56949
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/rpc/estimation/gasEstimationsV07.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down

0 comments on commit 5e56949

Please sign in to comment.