@@ -36,7 +36,6 @@ import Data.Map qualified as Map
36
36
import Data.Set qualified as Set
37
37
import Data.Text qualified as T
38
38
import Hydra.API.HTTPServer (
39
- DraftCommitTxRequest (.. ),
40
39
DraftCommitTxResponse (.. ),
41
40
TransactionSubmitted (.. ),
42
41
)
@@ -1333,7 +1332,7 @@ canDepositPartially tracer workDir blockTime backend hydraScriptsTxId =
1333
1332
(walletVk, walletSk) <- generate genKeyPair
1334
1333
commitUTxO <- seedFromFaucet backend walletVk 5_000_000 (contramap FromFaucet tracer)
1335
1334
-- This one is expected to fail since there is 5 ADA at the wallet address but we specified 6 ADA to commit
1336
- sendRequest 2 commitUTxO (Just 6_000_000 )
1335
+ (requestCommitTx' n1 commitUTxO (Just 6_000_000 ) <&> toJSON )
1337
1336
`shouldThrow` expectErrorStatus 400 (Just " AmountTooLow" )
1338
1337
1339
1338
commitUTxO2 <- seedFromFaucet backend walletVk 5_000_000 (contramap FromFaucet tracer)
@@ -1384,16 +1383,6 @@ canDepositPartially tracer workDir blockTime backend hydraScriptsTxId =
1384
1383
where
1385
1384
hydraTracer = contramap FromHydraNode tracer
1386
1385
1387
- sendRequest :: MonadIO m => Int -> UTxO. UTxO -> Maybe Coin -> m (JsonResponse Aeson. Value )
1388
- sendRequest hydraNodeId utxo amt =
1389
- runReq defaultHttpConfig $
1390
- req
1391
- POST
1392
- (http " 127.0.0.1" /: " commit" )
1393
- (ReqBodyJson $ SimpleCommitRequest @ Tx utxo amt)
1394
- (Proxy :: Proxy (JsonResponse Aeson. Value ))
1395
- (port $ 4000 + hydraNodeId)
1396
-
1397
1386
rejectCommit :: ChainBackend backend => Tracer IO EndToEndLog -> FilePath -> NominalDiffTime -> backend -> [TxId ] -> IO ()
1398
1387
rejectCommit tracer workDir blockTime backend hydraScriptsTxId =
1399
1388
(`finally` returnFundsToFaucet tracer backend Alice ) $ do
0 commit comments