11{-# LANGUAGE DeriveAnyClass #-}
2- -- withCreateProcess interface is annoying
32{-# OPTIONS_GHC -Wno-incomplete-uni-patterns #-}
43
54-- | Integration tests for the 'hydra-chain-observer' executable. These will run
@@ -18,7 +17,7 @@ import Data.Aeson.Lens (key, _JSON, _String)
1817import Data.ByteString (hGetLine )
1918import Data.List qualified as List
2019import Data.Text qualified as T
21- import Hydra.Cardano.Api (NetworkId (.. ), NetworkMagic (.. ), lovelaceToValue , mkVkAddress , signTx , unFile , utxoFromTx )
20+ import Hydra.Cardano.Api (NetworkId (.. ), NetworkMagic (.. ), lovelaceToValue , mkVkAddress , signTx , txOutValue , unFile , utxoFromTx )
2221import Hydra.Chain.Backend qualified as Backend
2322import Hydra.Chain.Direct (DirectBackend (.. ))
2423import Hydra.Cluster.Faucet (FaucetLog , publishHydraScriptsAs , seedFromFaucet , seedFromFaucet_ )
@@ -77,11 +76,12 @@ spec = do
7776 let walletAddress = mkVkAddress networkId walletVk
7877
7978 decommitTx <-
80- either (failure . show ) pure $
81- mkSimpleTx
82- (List. head $ UTxO. toList commitUTxO)
83- (walletAddress, lovelaceToValue 2_000_000 )
84- walletSk
79+ let (i, o) = List. head $ UTxO. toList commitUTxO
80+ in either (failure . show ) pure $
81+ mkSimpleTx
82+ (i, o)
83+ (walletAddress, txOutValue o)
84+ walletSk
8585
8686 send hydraNode $ input " Decommit" [" decommitTx" .= decommitTx]
8787
0 commit comments