put isHardHatProject in api

pull/1487/head
yann300 3 years ago
parent 0be2e2793f
commit bd57bc5bb6
  1. 4
      libs/remix-ui/solidity-compiler/src/lib/compiler-container.tsx
  2. 4
      libs/remix-ui/solidity-compiler/src/lib/solidity-compiler.tsx
  3. 2
      libs/remix-ui/solidity-compiler/src/lib/types/index.ts

@ -18,7 +18,7 @@ declare global {
const _paq = window._paq = window._paq || [] //eslint-disable-line
export const CompilerContainer = (props: CompilerContainerProps) => {
const { api, compileTabLogic, tooltip, modal, compiledFileName, setHardHatCompilation, updateCurrentVersion, isHardHatProject, configurationSettings } = props // eslint-disable-line
const { api, compileTabLogic, tooltip, modal, compiledFileName, setHardHatCompilation, updateCurrentVersion, configurationSettings } = props // eslint-disable-line
const [state, setState] = useState({
hideWarnings: false,
autoCompile: false,
@ -574,7 +574,7 @@ export const CompilerContainer = (props: CompilerContainerProps) => {
</div>
</div>
{
isHardHatProject &&
api.isHardHatProject &&
<div className="mt-3 remixui_compilerConfig custom-control custom-checkbox">
<input className="remixui_autocompile custom-control-input" onChange={updatehhCompilation} id="enableHardhat" type="checkbox" title="Enable Hardhat Compilation" checked={hhCompilation} />
<label className="form-check-label custom-control-label" htmlFor="enableHardhat">Enable Hardhat Compilation</label>

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

@ -4,7 +4,6 @@ export interface SolidityCompilerProps {
file: string
} | Record<string, any>
compileErrors: any,
isHardHatProject: boolean,
compileTabLogic: any,
contractsDetails: Record<string, any>,
contentImport: any,
@ -26,7 +25,6 @@ export interface CompilerContainerProps {
compiledFileName: string,
setHardHatCompilation: (value: boolean) => void,
updateCurrentVersion: any,
isHardHatProject: boolean,
configurationSettings: ConfigurationSettings
}
export interface ContractSelectionProps {

Loading…
Cancel
Save