diff --git a/apps/remix-ide/src/app/files/fileManager.ts b/apps/remix-ide/src/app/files/fileManager.ts index d9789f4512..aff574f5a8 100644 --- a/apps/remix-ide/src/app/files/fileManager.ts +++ b/apps/remix-ide/src/app/files/fileManager.ts @@ -704,7 +704,14 @@ class FileManager extends Plugin { return collectList(path) } - isRemixDActive() { + async fileList (dirPath) { + const paths: any = await this.readdir(dirPath) + for( const path in paths) + if(paths[path].isDirectory) delete paths[path] + return paths + } + + isRemixDActive () { return this.appManager.isActive('remixd') } diff --git a/libs/remix-core-plugin/src/lib/compiler-artefacts.ts b/libs/remix-core-plugin/src/lib/compiler-artefacts.ts index 041b98199e..99abe5b7d8 100644 --- a/libs/remix-core-plugin/src/lib/compiler-artefacts.ts +++ b/libs/remix-core-plugin/src/lib/compiler-artefacts.ts @@ -77,7 +77,7 @@ export class CompilerArtefacts extends Plugin { const contractsData = Object.values(contractsDataByFilename) if (contractsData && contractsData.length) { const index = contractsData.findIndex((contractsObj) => Object.keys(contractsObj).includes(contractName)) - if (index !== -1) return contractsData[index][contractName] + if (index !== -1) return { abi: contractsData[index][contractName].abi, bytecode: contractsData[index][contractName].evm.bytecode.object } else throw new Error(`Could not find artifacts for ${contractName}. Make sure it is compiled.`) } else throw new Error('No contract compiled') }