From 32a191c9132674b6b576c20ca2a423652044d2ad Mon Sep 17 00:00:00 2001 From: jsy1218 <91580504+jsy1218@users.noreply.github.com> Date: Mon, 9 Dec 2024 11:23:01 -0500 Subject: [PATCH] feedback --- src/providers/tenderly-simulation-provider.ts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/providers/tenderly-simulation-provider.ts b/src/providers/tenderly-simulation-provider.ts index 71af10dd0..3e34790ff 100644 --- a/src/providers/tenderly-simulation-provider.ts +++ b/src/providers/tenderly-simulation-provider.ts @@ -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(