diff --git a/apps/remix-ide/src/app/tabs/compile-tab.js b/apps/remix-ide/src/app/tabs/compile-tab.js index e027e1e5ce..b41dec9bbf 100644 --- a/apps/remix-ide/src/app/tabs/compile-tab.js +++ b/apps/remix-ide/src/app/tabs/compile-tab.js @@ -246,10 +246,7 @@ class CompileTab extends ViewPlugin { setCompilerConfig (settings) { return new Promise((resolve, reject) => { addTooltip(yo`
${this.currentRequest.from} is updating the Solidity compiler configuration.
${JSON.stringify(settings, null, '\t')}
`) - this.compilerContainer.setLanguage(settings.language) - this.compilerContainer.setEvmVersion(settings.evmVersion) - this.compilerContainer.setOptimize(settings.optimize) - this.compilerContainer.setVersion(settings.version) + this.compilerContainer.setConfiguration(settings) // @todo(#2875) should use loading compiler return value to check whether the compiler is loaded instead of "setInterval" let timeout = 0 const id = setInterval(() => { diff --git a/apps/remix-ide/src/app/tabs/compileTab/compilerContainer.js b/apps/remix-ide/src/app/tabs/compileTab/compilerContainer.js index 9c3fbfb50a..d5b6449d35 100644 --- a/apps/remix-ide/src/app/tabs/compileTab/compilerContainer.js +++ b/apps/remix-ide/src/app/tabs/compileTab/compilerContainer.js @@ -353,6 +353,13 @@ class CompilerContainer { They are an external API for modifying the compiler configuration. */ + setConfiguration (settings) { + this.setLanguage(settings.language) + this.setEvmVersion(settings.evmVersion) + this.setOptimize(settings.optimize) + this.setVersion(settings.version) + } + setOptimize (enabled) { this._view.optimize.checked = enabled this.onchangeOptimize()