From 8f952134b1345ce16bc9901c9fd4249417f0009e Mon Sep 17 00:00:00 2001 From: yann300 Date: Tue, 17 Aug 2021 14:49:45 +0200 Subject: [PATCH] setHardHatCompilation in api --- .../remix-ui/solidity-compiler/src/lib/compiler-container.tsx | 4 ++-- libs/remix-ui/solidity-compiler/src/lib/solidity-compiler.tsx | 4 ++-- libs/remix-ui/solidity-compiler/src/lib/types/index.ts | 2 -- 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/libs/remix-ui/solidity-compiler/src/lib/compiler-container.tsx b/libs/remix-ui/solidity-compiler/src/lib/compiler-container.tsx index 916b547cf4..91498d8894 100644 --- a/libs/remix-ui/solidity-compiler/src/lib/compiler-container.tsx +++ b/libs/remix-ui/solidity-compiler/src/lib/compiler-container.tsx @@ -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) } /* diff --git a/libs/remix-ui/solidity-compiler/src/lib/solidity-compiler.tsx b/libs/remix-ui/solidity-compiler/src/lib/solidity-compiler.tsx index ec0d7354a5..46c032d582 100644 --- a/libs/remix-ui/solidity-compiler/src/lib/solidity-compiler.tsx +++ b/libs/remix-ui/solidity-compiler/src/lib/solidity-compiler.tsx @@ -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 ( <>
- +
diff --git a/libs/remix-ui/solidity-compiler/src/lib/types/index.ts b/libs/remix-ui/solidity-compiler/src/lib/types/index.ts index 3fb4098041..a2106e2205 100644 --- a/libs/remix-ui/solidity-compiler/src/lib/types/index.ts +++ b/libs/remix-ui/solidity-compiler/src/lib/types/index.ts @@ -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 }