consider destination folder for flattened contract

pull/5370/head
Joseph Izang 2 years ago committed by Aniket
parent 40deffc009
commit ed79326b00
  1. 2
      apps/remix-ide/src/app/plugins/contractFlattener.tsx
  2. 2
      apps/remix-ide/src/app/plugins/solidity-umlgen.tsx

@ -47,7 +47,7 @@ export class ContractFlattener extends Plugin {
: dependencyGraph.sort().reverse()
const sources = source.sources
const result = concatSourceFiles(sorted, sources)
await this.call('fileManager', 'writeFile', `contracts/${filename}_flattened.sol`, result)
await this.call('fileManager', 'writeFile', `${filePath.split('/')[0]}/${filename}_flattened.sol`, result)
_paq.push(['trackEvent', 'plugin', 'contractFlattener', 'flattenAContract'])
}
}

@ -142,7 +142,7 @@ export class SolidityUmlGen extends ViewPlugin implements ISolidityUmlGen {
? [filePath]
: dependencyGraph.sort().reverse()
const result = concatSourceFiles(sorted, source.sources)
await this.call('fileManager', 'writeFile', `contracts/${filename}_flattened.sol`, result)
await this.call('fileManager', 'writeFile', `${filePath.split('/')[0]}/${filename}_flattened.sol`, result)
filename = null
return result
}

Loading…
Cancel
Save