Skip to content

Commit

Permalink
move execution to error instruction
Browse files Browse the repository at this point in the history
  • Loading branch information
saimeunt committed Mar 26, 2024
1 parent dc13ec6 commit 28f219f
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion context/cairoVMApiContext.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,11 @@ export const CairoVMApiProvider: React.FC<PropsWithChildren> = ({
: 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)
Expand Down

0 comments on commit 28f219f

Please sign in to comment.