fixflattener
lianahus 4 years ago
parent b22b4b7ff0
commit d9a91617b7
  1. 6
      apps/remix-ide/src/app/components/plugin-manager-component.js

@ -105,7 +105,7 @@ class PluginManagerComponent extends ViewPlugin {
async registerFlattener (event) {
if (!this.appManager.isActive('solidity')) { await this.appManager.activatePlugin('solidity') }
const compiledSuccessfully = await this.call('solidity', 'compileFile', event)
const reporCompileIssue = async () => {
const reportCompileIssue = async () => {
this.call('fileManager', 'open', event.path[0])
addToolTip('Cannot flatten the file. Please make sure it is compiling successfully.')
await this.call('menuicons', 'select', 'solidity')
@ -114,14 +114,14 @@ class PluginManagerComponent extends ViewPlugin {
if (compiledSuccessfully) {
const res = await this.call('solidity', 'getCompilationResult')
if (!res) {
reporCompileIssue()
reportCompileIssue()
} else {
await this.call('menuicons', 'select', 'flattener')
const path = await this.call('flattener', 'flattenAndSave', res)
await this.call('fileManager', 'open', path)
}
} else {
reporCompileIssue()
reportCompileIssue()
}
}, 1000)
}

Loading…
Cancel
Save