From 28f219f881c6e605a4d71a8bbcd1f53aab3559c8 Mon Sep 17 00:00:00 2001 From: Simon Date: Tue, 26 Mar 2024 16:44:49 +0100 Subject: [PATCH] move execution to error instruction --- context/cairoVMApiContext.tsx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/context/cairoVMApiContext.tsx b/context/cairoVMApiContext.tsx index 77208b9..89a5d92 100644 --- a/context/cairoVMApiContext.tsx +++ b/context/cairoVMApiContext.tsx @@ -177,7 +177,11 @@ export const CairoVMApiProvider: React.FC = ({ : ProgramExecutionState.Error, ) - setExecutionTraceStepNumber(0) + setExecutionTraceStepNumber( + data.is_execution_successful === true + ? 0 + : data.tracer_data.trace.length - 1, + ) setCasmCode(data.casm_program_code) setSierraCode(data.sierra_program_code) setCairoLangCompilerVersion(data.cairo_lang_compiler_version)