From 6afbdaab5cef23a48278a8022cb8f455df148b5c Mon Sep 17 00:00:00 2001 From: yann300 Date: Tue, 18 Dec 2018 13:33:53 +0100 Subject: [PATCH] only listen on pluginmanager --- src/app/tabs/run-tab.js | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) diff --git a/src/app/tabs/run-tab.js b/src/app/tabs/run-tab.js index 03e9f4f1c3..4067e69e63 100644 --- a/src/app/tabs/run-tab.js +++ b/src/app/tabs/run-tab.js @@ -71,7 +71,6 @@ function runTab (opts, localRegistry) { } // dependencies self._deps = { - compiler: self._components.registry.get('compiler').api, udapp: self._components.registry.get('udapp').api, udappUI: self._components.registry.get('udappUI').api, config: self._components.registry.get('config').api, @@ -310,21 +309,10 @@ function contractDropdown (events, self) { } self._deps.pluginManager.event.register('sendCompilationResult', (file, source, languageVersion, data) => { - // TODO check whether the tab is configured - let compiler = new CompilerAbstract(languageVersion, data) - self._deps.compilersArtefacts[languageVersion] = compiler - self._deps.compilersArtefacts['__last'] = compiler + let compiler = new CompilerAbstract(languageVersion, data, source) newlyCompiled(true, data, source, compiler, languageVersion) }) - self._deps.compiler.event.register('compilationFinished', (success, data, source) => { - var name = 'solidity' - let compiler = new CompilerAbstract(name, data) - self._deps.compilersArtefacts[name] = compiler - self._deps.compilersArtefacts['__last'] = compiler - newlyCompiled(success, data, source, self._deps.compiler, name) - }) - var deployAction = (value) => { self._view.createPanel.style.display = value self._view.orLabel.style.display = value @@ -350,7 +338,7 @@ function contractDropdown (events, self) { function getSelectedContract () { var contract = selectContractNames.children[selectContractNames.selectedIndex] var contractName = contract.innerHTML - var compiler = self._deps.compilersArtefacts[contract.getAttribute('compiler')] + var compiler = self._deps.compilersArtefacts['__last'] if (!compiler) return null if (contractName) {