( dataEntry: LogData, reversedPriorDebugSteps: AuthenticationProgramStateCommon[], vm: VM, )
| 243 | }; |
| 244 | |
| 245 | const decodeLogDataEntry = ( |
| 246 | dataEntry: LogData, |
| 247 | reversedPriorDebugSteps: AuthenticationProgramStateCommon[], |
| 248 | vm: VM, |
| 249 | ): string | bigint | boolean => { |
| 250 | if (typeof dataEntry === 'string') return dataEntry; |
| 251 | |
| 252 | const dataEntryDebugStep = reversedPriorDebugSteps.find((step) => step.ip === dataEntry.ip); |
| 253 | |
| 254 | if (!dataEntryDebugStep) { |
| 255 | throw new Error(`Should not happen: corresponding data entry debug step not found for entry at ip ${dataEntry.ip}`); |
| 256 | } |
| 257 | |
| 258 | const transformedDebugStep = applyStackItemTransformations(dataEntry, dataEntryDebugStep, vm); |
| 259 | return decodeStackItem(dataEntry, transformedDebugStep.stack); |
| 260 | }; |
| 261 | |
| 262 | const applyStackItemTransformations = ( |
| 263 | element: StackItem, |
no test coverage detected