Skip to content

Commit 92bcb58

Browse files
Use inEonForEra in assumeShelleyBasedEraOrThrow
1 parent 593cade commit 92bcb58

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
@@ -249,11 +249,7 @@ queryUTxOByTxIn networkId socket queryPoint inputs =
249249
pure $ UTxO.fromApi eraUTxO
250250

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

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

0 commit comments

Comments
 (0)