From 06e0fc129c58012626db2cdaf39a99e62b71689e Mon Sep 17 00:00:00 2001 From: aniket-engg Date: Tue, 18 May 2021 11:33:48 +0530 Subject: [PATCH] compileWithHardhat moved to compileTab --- apps/remix-ide/src/app/files/fileManager.js | 6 ------ apps/remix-ide/src/app/tabs/compileTab/compileTab.js | 4 +++- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/apps/remix-ide/src/app/files/fileManager.js b/apps/remix-ide/src/app/files/fileManager.js index 0ba692c32e..fd74b1722d 100644 --- a/apps/remix-ide/src/app/files/fileManager.js +++ b/apps/remix-ide/src/app/files/fileManager.js @@ -57,12 +57,6 @@ class FileManager extends Plugin { this.mode = mode } - async compileWithHardhat (fileContent) { - const configFilePath = 'remixCompiler.config.js' - this.setFileContent(configFilePath, fileContent) - return await this.appManager.call('hardhat', 'compile', configFilePath) - } - limitPluginScope (path) { return path.replace(/^\/browser\//, '').replace(/^browser\//, '') // forbids plugin to access the root filesystem } diff --git a/apps/remix-ide/src/app/tabs/compileTab/compileTab.js b/apps/remix-ide/src/app/tabs/compileTab/compileTab.js index ad1be493ed..69390b68e9 100644 --- a/apps/remix-ide/src/app/tabs/compileTab/compileTab.js +++ b/apps/remix-ide/src/app/tabs/compileTab/compileTab.js @@ -98,7 +98,9 @@ class CompileTab { } } ` - this.fileManager.compileWithHardhat(fileContent).then(console.log) + const configFilePath = 'remix-compiler.config.js' + this.fileManager.setFileContent(configFilePath, fileContent) + this.fileManager.appManager.call('hardhat', 'compile', configFilePath) } this.fileManager.saveCurrentFile() this.miscApi.clearAnnotations()