pull/5370/head
yann300 2 years ago
parent 81a74f4fb8
commit 83aa1e2ed7
  1. 6
      libs/remix-debug/src/solidity-decoder/internalCallTree.ts

@ -263,13 +263,13 @@ async function buildTree (tree, step, scopeId, isExternalCall, isCreation, funct
const generatedSources = getGeneratedSources(tree, scopeId, contractObj) const generatedSources = getGeneratedSources(tree, scopeId, contractObj)
const functionDefinition = resolveFunctionDefinition(tree, sourceLocation, generatedSources) const functionDefinition = resolveFunctionDefinition(tree, sourceLocation, generatedSources)
const isCallInstrn = isCallInstruction(stepDetail) const isInternalTxInstrn = isCallInstruction(stepDetail)
const isCreateInstrn = isCreateInstruction(stepDetail) const isCreateInstrn = isCreateInstruction(stepDetail)
// we are checking if we are jumping in a new CALL or in an internal function // we are checking if we are jumping in a new CALL or in an internal function
if (isCallInstrn || (previousSourceLocation.jump === 'i' && functionDefinition)) { if (isInternalTxInstrn || (previousSourceLocation.jump === 'i' && functionDefinition)) {
try { try {
const newScopeId = scopeId === '' ? subScope.toString() : scopeId + '.' + subScope const newScopeId = scopeId === '' ? subScope.toString() : scopeId + '.' + subScope
const externalCallResult = await buildTree(tree, step, newScopeId , isCallInstrn, isCreateInstrn, functionDefinition, contractObj, sourceLocation) const externalCallResult = await buildTree(tree, step, newScopeId, isInternalTxInstrn, isCreateInstrn, functionDefinition, contractObj, sourceLocation)
if (externalCallResult.error) { if (externalCallResult.error) {
return { outStep: step, error: 'InternalCallTree - ' + externalCallResult.error } return { outStep: step, error: 'InternalCallTree - ' + externalCallResult.error }
} else { } else {

Loading…
Cancel
Save