Skip to content

Commit 8f85a64

Browse files
committed
Fix failing http spec
Signed-off-by: Sasha Bogicevic <[email protected]>
1 parent e559618 commit 8f85a64

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

hydra-node/src/Hydra/API/HTTPServer.hs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -265,6 +265,7 @@ handleDraftCommitUtxo env pparams directChain getCommitInfo body = do
265265
CommittedTooMuchADAForMainnet _ _ -> badRequest e
266266
UnsupportedLegacyOutput _ -> badRequest e
267267
CannotFindOwnInitial _ -> badRequest e
268+
DepositTooLow _ _ -> badRequest e
268269
_ -> responseLBS status500 [] (Aeson.encode $ toJSON e)
269270
Right commitTx ->
270271
okJSON $ DraftCommitTxResponse commitTx

hydra-node/test/Hydra/API/HTTPServerSpec.hs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -444,6 +444,7 @@ apiServerSpec = do
444444
pure $ Right tx
445445
}
446446
let initialHeadState = Initial (generateWith arbitrary 42)
447+
let openHeadState = Open (generateWith arbitrary 42)
447448
prop "responds on valid requests" $ \(request :: DraftCommitTxRequest Tx) ->
448449
withApplication
449450
( httpApp
@@ -492,7 +493,7 @@ apiServerSpec = do
492493
(failingChainHandle postTxError)
493494
testEnvironment
494495
defaultPParams
495-
(pure initialHeadState)
496+
(pure openHeadState)
496497
getHeadId
497498
getPendingDeposits
498499
putClientInput

0 commit comments

Comments
 (0)