setHardHatCompilation in api

pull/1487/head
yann300 3 years ago
parent bd57bc5bb6
commit 8f952134b1
  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, configurationSettings } = props // eslint-disable-line
const { api, compileTabLogic, tooltip, modal, compiledFileName, updateCurrentVersion, configurationSettings } = props // eslint-disable-line
const [state, setState] = useState({
hideWarnings: false,
autoCompile: false,
@ -483,7 +483,7 @@ export const CompilerContainer = (props: CompilerContainerProps) => {
const checked = event.target.checked
sethhCompilation(checked)
setHardHatCompilation(checked)
api.setHardHatCompilation(checked)
}
/*

@ -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, setHardHatCompilation, configurationSettings } } = props
const { plugin, plugin: { compileTabLogic, contractsDetails, contractMap, compileErrors, 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} configurationSettings={configurationSettings} />
<CompilerContainer api={plugin} compileTabLogic={compileTabLogic} tooltip={toast} modal={modal} compiledFileName={currentFile} 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>

@ -9,7 +9,6 @@ export interface SolidityCompilerProps {
contentImport: any,
call: (...args) => void
on: (...args) => void,
setHardHatCompilation: (value: boolean) => void,
setSelectedVersion: (value: string) => void,
configurationSettings: ConfigurationSettings,
getConfiguration: (value: string) => string,
@ -23,7 +22,6 @@ export interface CompilerContainerProps {
tooltip: (message: string | JSX.Element) => void,
modal: (title: string, message: string | JSX.Element, okLabel: string, okFn: () => void, cancelLabel?: string, cancelFn?: () => void) => void,
compiledFileName: string,
setHardHatCompilation: (value: boolean) => void,
updateCurrentVersion: any,
configurationSettings: ConfigurationSettings
}

Loading…
Cancel
Save