Remove unnecessary props

pull/1339/head
ioedeveloper 3 years ago
parent 51e4c6f597
commit 54b80a92ee
  1. 18
      apps/remix-ide/src/app/tabs/compile-tab.js
  2. 4
      libs/remix-ui/solidity-compiler/src/lib/solidity-compiler.tsx
  3. 35
      libs/remix-ui/solidity-compiler/src/lib/types/index.ts

@ -68,6 +68,7 @@ class CompileTab extends ViewPlugin {
this.compileTabLogic.init()
this.contractMap = {}
this.isHardHatProject = false
this.compileErrors = {}
this.el = document.createElement('div')
this.el.setAttribute('id', 'compileTabView')
@ -274,22 +275,7 @@ class CompileTab extends ViewPlugin {
renderComponent () {
ReactDOM.render(
<SolidityCompiler
editor={this.editor}
config={this.config}
fileProvider={this.fileProvider}
fileManager={this.fileManager}
contentImport={this.contentImport}
queryParams={this.queryParams}
plugin={this}
compileTabLogic={this.compileTabLogic}
compiledFileName={this.currentFile}
contractsDetails={this.contractsDetails}
setHardHatCompilation={this.setHardHatCompilation.bind(this)}
contractMap={this.contractMap}
compileErrors={this.compileErrors || {}}
isHardHatProject={this.isHardHatProject}
/>
<SolidityCompiler plugin={this}/>
, this.el)
}

@ -9,7 +9,7 @@ import { Renderer } from '@remix-ui/renderer'
import './css/style.css'
export const SolidityCompiler = (props: SolidityCompilerProps) => {
const { editor, config, queryParams, plugin, compileTabLogic, compiledFileName, fileProvider, fileManager, contractsDetails, setHardHatCompilation, contractMap, compileErrors, isHardHatProject } = props
const { plugin, plugin : { editor, config, queryParams, compileTabLogic, compiledFileName, fileProvider, fileManager, contractsDetails, contractMap, compileErrors, isHardHatProject, setHardHatCompilation } } = props
const [state, setState] = useState({
contractsDetails: {},
eventHandlers: {},
@ -81,7 +81,7 @@ export const SolidityCompiler = (props: SolidityCompilerProps) => {
return (
<>
<div id="compileTabView">
<CompilerContainer editor={editor} config={config} queryParams={queryParams} compileTabLogic={compileTabLogic} tooltip={toast} modal={modal} compiledFileName={compiledFileName} setHardHatCompilation={setHardHatCompilation} updateCurrentVersion={updateCurrentVersion} isHardHatProject={isHardHatProject} />
<CompilerContainer editor={editor} config={config} queryParams={queryParams} compileTabLogic={compileTabLogic} tooltip={toast} modal={modal} compiledFileName={compiledFileName} setHardHatCompilation={setHardHatCompilation.bind(plugin)} updateCurrentVersion={updateCurrentVersion} isHardHatProject={isHardHatProject} />
<ContractSelection contractMap={contractMap} fileProvider={fileProvider} fileManager={fileManager} contractsDetails={contractsDetails} modal={modal} />
<div className="remixui_errorBlobs p-4" data-id="compiledErrors">
<span data-id={`compilationFinishedWith_${currentVersion}`}></span>

@ -1,21 +1,24 @@
export interface SolidityCompilerProps {
editor: any,
config: any,
fileProvider: any,
fileManager: any,
contentImport: any,
plugin: any,
queryParams: any,
compileTabLogic: any,
compiledFileName: string,
contractsDetails: Record<string, any>,
setHardHatCompilation: (value: boolean) => void,
contractMap: {
file: string
} | Record<string, any>
compileErrors: any,
isHardHatProject: boolean
plugin: {
contractMap: {
file: string
} | Record<string, any>
compileErrors: any,
isHardHatProject: boolean,
queryParams: any,
compileTabLogic: any,
compiledFileName: string,
contractsDetails: Record<string, any>,
editor: any,
config: any,
fileProvider: any,
fileManager: any,
contentImport: any,
call: (...args) => void
on: (...args) => void,
setHardHatCompilation: (value: boolean) => void,
},
}
export interface CompilerContainerProps {

Loading…
Cancel
Save