diff --git a/src/app/tabs/run-tab.js b/src/app/tabs/run-tab.js index e9c4539c51..576865c8ad 100644 --- a/src/app/tabs/run-tab.js +++ b/src/app/tabs/run-tab.js @@ -143,16 +143,16 @@ function runTab (opts, localRegistry) { }) var dropdownLogic = new DropdownLogic( - this.parentSelf._deps.fileManager, - this.parentSelf._deps.pluginManager, - this.parentSelf._deps.compilersArtefacts, - this.parentSelf._deps.compiler, - this.parentSelf._deps.config, - this.parentSelf._deps.editor, - this.parentSelf._deps.udapp, - this.parentSelf._deps.filePanel + this._deps.fileManager, + this._deps.pluginManager, + this._deps.compilersArtefacts, + this._deps.compiler, + this._deps.config, + this._deps.editor, + this._deps.udapp, + this._deps.filePanel ) - var contractDropdownUI = new ContractDropdownUI(dropdownLogic, self) + var contractDropdownUI = new ContractDropdownUI(dropdownLogic, this._deps.logCallback) contractDropdownUI.event.register('clearInstance', () => { var noInstancesText = this._view.noInstancesText diff --git a/src/app/tabs/runTab/contractDropdown.js b/src/app/tabs/runTab/contractDropdown.js index 588db7c77d..5d4fd60aec 100644 --- a/src/app/tabs/runTab/contractDropdown.js +++ b/src/app/tabs/runTab/contractDropdown.js @@ -8,9 +8,9 @@ var modalDialog = require('../../ui/modaldialog') var MultiParamManager = require('../../../multiParamManager') class ContractDropdownUI { - constructor (dropdownLogic, parentSelf) { - this.parentSelf = parentSelf + constructor (dropdownLogic, logCallback) { this.dropdownLogic = dropdownLogic + this.logCallback = logCallback this.event = new EventManager() this.listenToEvents() @@ -143,14 +143,14 @@ class ContractDropdownUI { } var statusCb = (msg) => { - return this.parentSelf._deps.logCallback(msg) + return this.logCallback(msg) } var finalCb = (error, contractObject, address) => { this.event.trigger('clearInstance') if (error) { - return this.parentSelf._deps.logCallback(error) + return this.logCallback(error) } this.event.trigger('newContractInstanceAdded', [contractObject, address, this.selectContractNames.value]) @@ -167,7 +167,7 @@ class ContractDropdownUI { }}, { label: 'Cancel', fn: () => { - this.parentSelf._deps.logCallback(`creation of ${selectedContract.name} canceled by user.`) + this.logCallback(`creation of ${selectedContract.name} canceled by user.`) } }) }