Skip to content

Commit

Permalink
Fix inverted logic
Browse files Browse the repository at this point in the history
  • Loading branch information
elopez committed Nov 5, 2024
1 parent 0fbd74f commit cdb6f44
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions lib/Echidna/SourceAnalysis/Slither.hs
Original file line number Diff line number Diff line change
Expand Up @@ -185,4 +185,5 @@ emptySlitherInfo = SlitherInfo mempty mempty mempty mempty mempty [] [] []

isEmptySlitherInfo :: Maybe SlitherInfo -> Bool
isEmptySlitherInfo (Just (SlitherInfo _ _ _ _ _ [] [] [])) = True
isEmptySlitherInfo Nothing = True
isEmptySlitherInfo _ = False
2 changes: 1 addition & 1 deletion lib/Echidna/UI.hs
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ ui vm dict initialCorpus cliSelectedContract = do
, timeStarted = now
, timeStopped = Nothing
, now = now
, slitherSucceeded = isEmptySlitherInfo env.slitherInfo
, slitherSucceeded = not $ isEmptySlitherInfo env.slitherInfo
, fetchedContracts = mempty
, fetchedSlots = mempty
, fetchedDialog = B.dialog (Just $ str " Fetched contracts/slots ") Nothing 80
Expand Down
4 changes: 2 additions & 2 deletions lib/Echidna/UI/Widgets.hs
Original file line number Diff line number Diff line change
Expand Up @@ -228,8 +228,8 @@ slitherWidget
:: Bool
-> Widget Name
slitherWidget slitherSucceeded = if slitherSucceeded
then alert (str "No Slither in use")
else success (str "Slither succeeded")
then success (str "Slither succeeded")
else alert (str "No Slither in use!")

outOf :: Int -> Int -> Widget n
outOf n m =
Expand Down

0 comments on commit cdb6f44

Please sign in to comment.