hiding slinther checkbox when remixd deactivated

pull/1412/head
lianahus 3 years ago committed by Aniket
parent a0f51845a7
commit f2df1daad9
  1. 13
      libs/remix-ui/static-analyser/src/lib/remix-ui-static-analyser.tsx

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

Loading…
Cancel
Save