fix listen on truffle compilation

pull/5370/head
yann300 2 years ago
parent eed88f7b91
commit a9f28c6da3
  1. 2
      libs/remix-ui/run-tab/src/lib/actions/events.ts
  2. 2
      libs/remixd/src/services/truffleClient.ts

@ -55,6 +55,8 @@ export const setupEvents = (plugin: RunTab, dispatch: React.Dispatch<any>) => {
plugin.on('foundry', 'compilationFinished', (file, source, languageVersion, data) => broadcastCompilationResult('foundry', plugin, dispatch, file, source, languageVersion, data)) plugin.on('foundry', 'compilationFinished', (file, source, languageVersion, data) => broadcastCompilationResult('foundry', plugin, dispatch, file, source, languageVersion, data))
plugin.on('truffle', 'compilationFinished', (file, source, languageVersion, data) => broadcastCompilationResult('truffle', plugin, dispatch, file, source, languageVersion, data))
plugin.on('udapp', 'setEnvironmentModeReducer', (env: { context: string, fork: string }, from: string) => { plugin.on('udapp', 'setEnvironmentModeReducer', (env: { context: string, fork: string }, from: string) => {
plugin.call('notification', 'toast', envChangeNotification(env, from)) plugin.call('notification', 'toast', envChangeNotification(env, from))
setExecutionContext(plugin, dispatch, env) setExecutionContext(plugin, dispatch, env)

@ -60,7 +60,7 @@ export class TruffleClient extends PluginClient {
listenOnTruffleCompilation () { listenOnTruffleCompilation () {
try { try {
const buildPath = utils.absolutePath('out', this.currentSharedFolder) const buildPath = utils.absolutePath('build/contracts', this.currentSharedFolder)
this.watcher = chokidar.watch(buildPath, { depth: 3, ignorePermissionErrors: true, ignoreInitial: true }) this.watcher = chokidar.watch(buildPath, { depth: 3, ignorePermissionErrors: true, ignoreInitial: true })
const compilationResult = { const compilationResult = {
input: {}, input: {},

Loading…
Cancel
Save