reset only if remixd is deactivated

pull/5370/head
lianahus 3 years ago committed by Aniket
parent 0d5fdb171b
commit 144e5c902d
  1. 4
      libs/remix-ui/static-analyser/src/lib/remix-ui-static-analyser.tsx

@ -95,14 +95,14 @@ export const RemixUiStaticAnalyser = (props: RemixUiStaticAnalyserProps) => {
} }
}) })
props.analysisModule.on('manager', 'pluginDeactivated', (plugin) => { props.analysisModule.on('manager', 'pluginDeactivated', (plugin) => {
// Hide 'Enable Slither Analysis' checkbox
if (plugin.name === 'remixd') {
// Reset warning state // Reset warning state
setWarningState([]) setWarningState([])
// Reset badge // Reset badge
props.event.trigger('staticAnaysisWarning', []) props.event.trigger('staticAnaysisWarning', [])
// Reset state // Reset state
dispatch({ type: '', payload: {} }) dispatch({ type: '', payload: {} })
// Hide 'Enable Slither Analysis' checkbox
if (plugin.name === 'remixd') {
setShowSlither('hidden') setShowSlither('hidden')
setSlitherEnabled(false) setSlitherEnabled(false)
} }

Loading…
Cancel
Save