diff --git a/src/app/tabs/runTab/model/dropdownlogic.js b/src/app/tabs/runTab/model/dropdownlogic.js index 2c90db2920..46ae90ddff 100644 --- a/src/app/tabs/runTab/model/dropdownlogic.js +++ b/src/app/tabs/runTab/model/dropdownlogic.js @@ -28,13 +28,19 @@ class DropdownLogic { // TODO: can be moved up; the event in contractDropdown will have to refactored a method instead listenToCompilationEvents () { - this.runView.on('solidity', 'compilationFinished', (file, source, languageVersion, data) => { + let broadcastCompilationResult = (file, source, languageVersion, data) => { // TODO check whether the tab is configured let compiler = new CompilerAbstract(languageVersion, data, source) this.compilersArtefacts[languageVersion] = compiler this.compilersArtefacts['__last'] = compiler - this.event.trigger('newlyCompiled', [true, data, source, compiler, languageVersion]) - }) + this.event.trigger('newlyCompiled', [true, data, source, compiler, languageVersion, file]) + } + this.runView.on('solidity', 'compilationFinished', (file, source, languageVersion, data) => + broadcastCompilationResult(file, source, languageVersion, data) + ) + this.runView.on('vyper', 'compilationFinished', (file, source, languageVersion, data) => + broadcastCompilationResult(file, source, languageVersion, data) + ) } loadContractFromAddress (address, confirmCb, cb) {