Skip to content

Commit 9a5ad52

Browse files
Use inEonForEra in assumeShelleyBasedEraOrThrow
1 parent 0377bcd commit 9a5ad52

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

hydra-node/src/Hydra/Chain/CardanoClient.hs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -250,11 +250,7 @@ queryUTxOByTxIn networkId socket queryPoint inputs =
250250
pure $ UTxO.fromApi eraUTxO
251251

252252
assumeShelleyBasedEraOrThrow :: MonadThrow m => CardanoEra era -> m (ShelleyBasedEra era)
253-
assumeShelleyBasedEraOrThrow era = do
254-
x <- requireShelleyBasedEra era
255-
case x of
256-
Just sbe -> pure sbe
257-
Nothing -> throwIO $ QueryNotShelleyBasedEraException (anyCardanoEra era)
253+
assumeShelleyBasedEraOrThrow era = inEonForEra (throwIO $ QueryNotShelleyBasedEraException $ anyCardanoEra era) pure era
258254

259255
-- | Query the whole UTxO from node at given point. Useful for debugging, but
260256
-- should obviously not be used in production code.

0 commit comments

Comments
 (0)