diff --git a/src/app.js b/src/app.js index d81b95f9f0..0463565f83 100644 --- a/src/app.js +++ b/src/app.js @@ -586,15 +586,10 @@ Please make a backup of your contracts and start using http://remix.ethereum.org self._view.transactionDebugger.addProvider('web3', executionContext.internalWeb3()) self._view.transactionDebugger.switchProvider(executionContext.getProvider()) - var txLogger = new TxLogger() - - txLogger.event.register('debugRequested', (hash) => { - self.startdebugging(hash) - }) + var txLogger = new TxLogger() // eslint-disable-line var previousInput = '' var saveTimeout = null - function editorOnChange () { var currentFile = self._components.config.get('currentFile') if (!currentFile) { @@ -668,8 +663,8 @@ Please make a backup of your contracts and start using http://remix.ethereum.org fileManager.switchFile(previouslyOpenedFile) } else { fileManager.switchFile() - } - }) + } + }) } else { fileManager.switchFile() } diff --git a/src/app/execution/txLogger.js b/src/app/execution/txLogger.js index 73fe26a5df..a6320cdc88 100644 --- a/src/app/execution/txLogger.js +++ b/src/app/execution/txLogger.js @@ -120,7 +120,6 @@ var css = csjs` }` /** * This just export a function that register to `newTransaction` and forward them to the logger. - * Emit debugRequested * */ class TxLogger { @@ -141,7 +140,8 @@ class TxLogger { editorPanel: this._components.registry.get('editorpanel').api, txListener: this._components.registry.get('txlistener').api, eventsDecoder: this._components.registry.get('eventsdecoder').api, - compiler: this._components.registry.get('compiler').api + compiler: this._components.registry.get('compiler').api, + app: this._components.registry.get('app').api } this.logKnownTX = this._deps.editorPanel.registerCommand('knownTransaction', (args, cmds, append) => { @@ -205,7 +205,7 @@ function debug (e, data, self) { if (data.tx.isCall && data.tx.envMode !== 'vm') { modalDialog.alert('Cannot debug this call. Debugging calls is only possible in JavaScript VM mode.') } else { - self.event.trigger('debugRequested', [data.tx.hash]) + self._deps.app.startdebugging(data.tx.hash) } }