don't trigger event for debugging start

pull/1/head
yann300 7 years ago
parent 0bf87cce1b
commit 702cbb84db
  1. 11
      src/app.js
  2. 6
      src/app/execution/txLogger.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.addProvider('web3', executionContext.internalWeb3())
self._view.transactionDebugger.switchProvider(executionContext.getProvider()) self._view.transactionDebugger.switchProvider(executionContext.getProvider())
var txLogger = new TxLogger() var txLogger = new TxLogger() // eslint-disable-line
txLogger.event.register('debugRequested', (hash) => {
self.startdebugging(hash)
})
var previousInput = '' var previousInput = ''
var saveTimeout = null var saveTimeout = null
function editorOnChange () { function editorOnChange () {
var currentFile = self._components.config.get('currentFile') var currentFile = self._components.config.get('currentFile')
if (!currentFile) { if (!currentFile) {
@ -668,8 +663,8 @@ Please make a backup of your contracts and start using http://remix.ethereum.org
fileManager.switchFile(previouslyOpenedFile) fileManager.switchFile(previouslyOpenedFile)
} else { } else {
fileManager.switchFile() fileManager.switchFile()
} }
}) })
} else { } else {
fileManager.switchFile() fileManager.switchFile()
} }

@ -120,7 +120,6 @@ var css = csjs`
}` }`
/** /**
* This just export a function that register to `newTransaction` and forward them to the logger. * This just export a function that register to `newTransaction` and forward them to the logger.
* Emit debugRequested
* *
*/ */
class TxLogger { class TxLogger {
@ -141,7 +140,8 @@ class TxLogger {
editorPanel: this._components.registry.get('editorpanel').api, editorPanel: this._components.registry.get('editorpanel').api,
txListener: this._components.registry.get('txlistener').api, txListener: this._components.registry.get('txlistener').api,
eventsDecoder: this._components.registry.get('eventsdecoder').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) => { 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') { if (data.tx.isCall && data.tx.envMode !== 'vm') {
modalDialog.alert('Cannot debug this call. Debugging calls is only possible in JavaScript VM mode.') modalDialog.alert('Cannot debug this call. Debugging calls is only possible in JavaScript VM mode.')
} else { } else {
self.event.trigger('debugRequested', [data.tx.hash]) self._deps.app.startdebugging(data.tx.hash)
} }
} }

Loading…
Cancel
Save