From ab45e9e62d2ba5d78720bc828a01a11361a873e8 Mon Sep 17 00:00:00 2001 From: Sebastian Nagel Date: Thu, 29 Jul 2021 18:31:08 +0200 Subject: [PATCH] Make plutus test pass with && --- hydra-plutus/src/Hydra/Contract/OnChain.hs | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/hydra-plutus/src/Hydra/Contract/OnChain.hs b/hydra-plutus/src/Hydra/Contract/OnChain.hs index 08b368cc90f..3d38c353a37 100644 --- a/hydra-plutus/src/Hydra/Contract/OnChain.hs +++ b/hydra-plutus/src/Hydra/Contract/OnChain.hs @@ -88,13 +88,11 @@ hydraValidator HeadParameters{participants, policyId} s i ctx = Open committedOutputs amountPaid = foldMap txOutValue collectComUtxos - in and - [ mustBeSignedByOneOf participants ctx - , all (mustForwardParty ctx policyId) participants - , checkScriptContext @(RedeemerType Hydra) @(DatumType Hydra) - (mustPayToTheScript newState amountPaid) - ctx - ] + in mustBeSignedByOneOf participants ctx + && all (mustForwardParty ctx policyId) participants + && checkScriptContext @(RedeemerType Hydra) @(DatumType Hydra) + (mustPayToTheScript newState amountPaid) + ctx (Initial, Abort) -> let newState = Final