From c4eabfca4f8bbf6e591a60d84c3892cff8c9a883 Mon Sep 17 00:00:00 2001 From: bunsenstraat Date: Sun, 8 Sep 2024 10:52:04 +0200 Subject: [PATCH] current template --- apps/remix-ide/src/app/tabs/script-runner-ui.tsx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/apps/remix-ide/src/app/tabs/script-runner-ui.tsx b/apps/remix-ide/src/app/tabs/script-runner-ui.tsx index d5072b80cd..e698f3a642 100644 --- a/apps/remix-ide/src/app/tabs/script-runner-ui.tsx +++ b/apps/remix-ide/src/app/tabs/script-runner-ui.tsx @@ -20,6 +20,7 @@ const profile = { export class ScriptRunnerUIPlugin extends ViewPlugin { engine: Engine current: string + currentTemplate: string constructor(engine: Engine) { super(profile) console.log('ScriptRunnerUIPlugin', this) @@ -44,6 +45,7 @@ export class ScriptRunnerUIPlugin extends ViewPlugin { await this.call('manager', 'activatePlugin', newProfile.name) this.current = newProfile.name + this.currentTemplate = name this.on(newProfile.name, 'log', this.log.bind(this)) this.on(newProfile.name, 'info', this.log.bind(this)) this.on(newProfile.name, 'warn', this.log.bind(this)) @@ -52,8 +54,8 @@ export class ScriptRunnerUIPlugin extends ViewPlugin { async execute (script: string, filePath: string) { if(!this.current) await this.loadScriptRunner('default') - console.log('execute', script, filePath) - this.call(this.current, 'execute', script, filePath) + console.log('execute', this.current) + await this.call(this.current, 'execute', script, filePath) } async log(data: any){