only listen on pluginmanager

pull/1/head
yann300 6 years ago
parent 3cc6cfba62
commit 6afbdaab5c
  1. 16
      src/app/tabs/run-tab.js

@ -71,7 +71,6 @@ function runTab (opts, localRegistry) {
} }
// dependencies // dependencies
self._deps = { self._deps = {
compiler: self._components.registry.get('compiler').api,
udapp: self._components.registry.get('udapp').api, udapp: self._components.registry.get('udapp').api,
udappUI: self._components.registry.get('udappUI').api, udappUI: self._components.registry.get('udappUI').api,
config: self._components.registry.get('config').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) => { self._deps.pluginManager.event.register('sendCompilationResult', (file, source, languageVersion, data) => {
// TODO check whether the tab is configured let compiler = new CompilerAbstract(languageVersion, data, source)
let compiler = new CompilerAbstract(languageVersion, data)
self._deps.compilersArtefacts[languageVersion] = compiler
self._deps.compilersArtefacts['__last'] = compiler
newlyCompiled(true, data, source, compiler, languageVersion) 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) => { var deployAction = (value) => {
self._view.createPanel.style.display = value self._view.createPanel.style.display = value
self._view.orLabel.style.display = value self._view.orLabel.style.display = value
@ -350,7 +338,7 @@ function contractDropdown (events, self) {
function getSelectedContract () { function getSelectedContract () {
var contract = selectContractNames.children[selectContractNames.selectedIndex] var contract = selectContractNames.children[selectContractNames.selectedIndex]
var contractName = contract.innerHTML var contractName = contract.innerHTML
var compiler = self._deps.compilersArtefacts[contract.getAttribute('compiler')] var compiler = self._deps.compilersArtefacts['__last']
if (!compiler) return null if (!compiler) return null
if (contractName) { if (contractName) {

Loading…
Cancel
Save