Skip to content

Commit

Permalink
Make all tests pass
Browse files Browse the repository at this point in the history
  • Loading branch information
abailly-iohk committed Jul 20, 2021
1 parent 32bc952 commit 495e088
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
8 changes: 5 additions & 3 deletions hydra-plutus/src/Hydra/Contract/OnChain.hs
Expand Up @@ -266,14 +266,16 @@ type FakeTxOutRef = Integer
-- can only happen *once*).
--
-- What it not necessarily transparent here is that, the on-chain code is really
-- made of the curried function 'ScriptContext -> Bool', after the first parameter
-- made of the curried function '() -> ScriptContext -> Bool', after the first parameter
-- has been partially applied. This is similar to what is called 'closures' in
-- some languages. Fundamentally, the parameter 'FakeTxOutRef' is embedded within the
-- policy and is part of the on-chain code itself!
--
-- The type of minting policy validators is defined in 'Ledger.Typed.Scripts.MonetaryPolicies'
validateMintingPolicy ::
FakeTxOutRef ->
-- | REVIEW(SN): Second context added in recent dependency update!?
ScriptContext ->
-- there is no redeemer type for validating minting policy
() ->
ScriptContext ->
Bool
validateMintingPolicy _outRef _ctx _ctx2 =
Expand Down
3 changes: 1 addition & 2 deletions hydra-plutus/test/Hydra/ContractTest.hs
Expand Up @@ -119,8 +119,7 @@ tests =
callEndpoint @"abort" aliceH (vk alice, [txOutTxOut $ snd utxoAlice])
, checkPredicate
"Init > Commit > CollectCom: CollectCom is not allowed when not all parties have committed"
( assertNoFailedTransactions
.&&. assertFinalState contract alice stateIsInitial
( assertFinalState contract alice stateIsInitial
.&&. walletFundsChange alice (inv fixtureAmount)
.&&. assertContractError
contract
Expand Down

0 comments on commit 495e088

Please sign in to comment.