Skip to content

Commit

Permalink
feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
jsy1218 committed Dec 9, 2024
1 parent 70968c5 commit 32a191c
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/providers/tenderly-simulation-provider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -466,7 +466,13 @@ export class TenderlySimulator extends Simulator {
)}.`
);

if ((resp.result[2] as JsonRpcError).error.data) {
if (
resp &&
resp.result &&
resp.result.length >= 3 &&
(resp.result[2] as JsonRpcError).error &&
(resp.result[2] as JsonRpcError).error.data
) {
return {
...swapRoute,
simulationStatus: breakDownTenderlySimulationError(
Expand Down

0 comments on commit 32a191c

Please sign in to comment.