From 21d37c5686dcadfc455812005383973e0a6c08a1 Mon Sep 17 00:00:00 2001 From: Joseph Izang Date: Wed, 28 Jun 2023 21:34:13 +0100 Subject: [PATCH] fix warning reset on compile --- .../static-analyser/src/lib/remix-ui-static-analyser.tsx | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/libs/remix-ui/static-analyser/src/lib/remix-ui-static-analyser.tsx b/libs/remix-ui/static-analyser/src/lib/remix-ui-static-analyser.tsx index 0c70d8ed20..58a6f6ee01 100644 --- a/libs/remix-ui/static-analyser/src/lib/remix-ui-static-analyser.tsx +++ b/libs/remix-ui/static-analyser/src/lib/remix-ui-static-analyser.tsx @@ -124,6 +124,14 @@ export const RemixUiStaticAnalyser = (props: RemixUiStaticAnalyserProps) => { props.event.trigger('staticAnalysisWarning', [-1]) }, [state]) + useEffect(() => { + props.analysisModule.on('solidity', 'compilationFinished', (fileName, source, languageVersion, data) => { + setHints([]) + setSlitherWarnings([]) + setSsaWarnings([]) + }) + }, [state]) + useEffect(() => { const checkRemixdActive = async () => { const remixdActive = await props.analysisModule.call('manager', 'isActive', 'remixd')