Skip to content

Commit

Permalink
Update plutus-contract/src/Plutus/Contract/Test/ContractModel.hs
Browse files Browse the repository at this point in the history
Co-authored-by: Michael Peyton Jones <me@michaelpj.com>
  • Loading branch information
MaximilianAlgehed and michaelpj committed Oct 12, 2021
1 parent e47f970 commit b4718a0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion plutus-contract/src/Plutus/Contract/Test/ContractModel.hs
Expand Up @@ -1155,7 +1155,7 @@ data WhitelistEntry = WhitelistEntry { acceptEmptyLog :: Bool, errorPrefixes ::
-- | A whitelist associates errors with a whitelist entry
type Whitelist = Map String WhitelistEntry

-- | Check that a log is accepted by a whitelist entry
-- | Check that the last entry in a log is accepted by a whitelist entry
isAcceptedBy :: Maybe Text.Text -> WhitelistEntry -> Bool
isAcceptedBy Nothing wle = acceptEmptyLog wle
isAcceptedBy (Just lastEntry) wle = any (`Text.isPrefixOf` lastEntry) (errorPrefixes wle)
Expand Down

0 comments on commit b4718a0

Please sign in to comment.