From 7cba306bf70f7f859fdd7a254d2bc04dffbd425c Mon Sep 17 00:00:00 2001 From: Joseph Izang Date: Wed, 14 Jun 2023 12:18:47 +0100 Subject: [PATCH] flesh out detection of remixd session to enable slither --- .../src/lib/remix-ui-static-analyser.tsx | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) 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 d1c07e19d7..79b30b6923 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 @@ -131,8 +131,15 @@ export const RemixUiStaticAnalyser = (props: RemixUiStaticAnalyserProps) => { }, []) useEffect(() => { - - }, []) + const checkRemixdActive = async () => { + const remixdActive = await props.analysisModule.call('manager', 'isActive', 'remixd') + if (remixdActive) { + setSlitherEnabled(true) + setShowSlither(true) + } + } + checkRemixdActive() + }, [props]) useEffect(() => { props.analysisModule.on('filePanel', 'setWorkspace', (currentWorkspace) => {