Skip to content

Commit

Permalink
Add instance ToCardanoEra Exp.Era
Browse files Browse the repository at this point in the history
  • Loading branch information
smelc committed Nov 14, 2024
1 parent d7c62a0 commit ec04444
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions cardano-api/internal/Cardano/Api/Experimental/Eras.hs
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,12 @@ instance Eon Era where
Api.BabbageEra -> f BabbageEra
_ -> v

-- | A temporary compatibility instance, for easier conversion between experimental and old API.
instance Api.ToCardanoEra Era where
toCardanoEra = \case
BabbageEra -> Api.BabbageEra
ConwayEra -> Api.ConwayEra

obtainCommonConstraints
:: Era era
-> (EraCommonConstraints era => a)
Expand Down

0 comments on commit ec04444

Please sign in to comment.