Commit 0bfcb2b8 authored by yann300's avatar yann300

pass the address to "newSourceLocation" listenners

parent e160cdd9
......@@ -82,7 +82,7 @@ export class Debugger {
}
}
var lineColumnPos = this.offsetToLineColumnConverter.offsetToLineColumn(rawLocation, rawLocation.file, sources, astSources)
this.event.trigger('newSourceLocation', [lineColumnPos, rawLocation, generatedSources])
this.event.trigger('newSourceLocation', [lineColumnPos, rawLocation, generatedSources, address])
} else {
this.event.trigger('newSourceLocation', [null])
}
......
......@@ -72,12 +72,11 @@ export const DebuggerUI = (props: DebuggerUIProps) => {
})
})
debuggerInstance.event.register('newSourceLocation', async (lineColumnPos, rawLocation, generatedSources) => {
debuggerInstance.event.register('newSourceLocation', async (lineColumnPos, rawLocation, generatedSources, address) => {
if (!lineColumnPos) return
const contracts = await debuggerModule.fetchContractAndCompile(
currentReceipt.contractAddress || currentReceipt.to,
address || currentReceipt.contractAddress || currentReceipt.to,
currentReceipt)
if (contracts) {
let path = contracts.getSourceName(rawLocation.file)
if (!path) {
......@@ -152,7 +151,9 @@ export const DebuggerUI = (props: DebuggerUIProps) => {
offsetToLineColumnConverter: debuggerModule.offsetToLineColumnConverter,
compilationResult: async (address) => {
try {
return await debuggerModule.fetchContractAndCompile(address, currentReceipt)
const ret = await debuggerModule.fetchContractAndCompile(address, currentReceipt)
console.log('ok', ret)
return ret
} catch (e) {
console.error(e)
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment