Update codeManager.ts

pull/5623/head
maradini77 3 weeks ago committed by Aniket
parent 8df5225c95
commit 876b981aed
  1. 14
      libs/remix-debug/src/code/codeManager.ts

@ -134,25 +134,25 @@ export class CodeManager {
return findNodeAtInstructionIndex('FunctionDefinition', instIndex, sourceMap, ast)
}
private retrieveCodeAndTrigger (codeMananger, address, stepIndex, tx) {
codeMananger.getCode(address).then((result) => {
this.retrieveIndexAndTrigger(codeMananger, address, stepIndex, result.instructions)
private retrieveCodeAndTrigger (codeManager, address, stepIndex, tx) {
codeManager.getCode(address).then((result) => {
this.retrieveIndexAndTrigger(codeManager, address, stepIndex, result.instructions)
}).catch((error) => {
return console.log(error)
})
}
private async retrieveIndexAndTrigger (codeMananger, address, step, code) {
private async retrieveIndexAndTrigger (codeManager, address, step, code) {
let result
const next = []
const returnInstructionIndexes = []
const outOfGasInstructionIndexes = []
try {
result = codeMananger.getInstructionIndex(address, step)
result = codeManager.getInstructionIndex(address, step)
for (let i = 1; i < 6; i++) {
if (this.traceManager.inRange(step + i)) {
next.push(codeMananger.getInstructionIndex(address, step + i))
next.push(codeManager.getInstructionIndex(address, step + i))
}
}
@ -177,7 +177,7 @@ export class CodeManager {
return console.log(error)
}
try {
codeMananger.event.trigger('changed', [code, address, result, next, returnInstructionIndexes, outOfGasInstructionIndexes])
codeManager.event.trigger('changed', [code, address, result, next, returnInstructionIndexes, outOfGasInstructionIndexes])
} catch (e) {
console.log('dispatching event failed', e)
}

Loading…
Cancel
Save