Skip to content

Commit

Permalink
Add 'Convert Era MaryEraOnwards' instance
Browse files Browse the repository at this point in the history
  • Loading branch information
smelc committed Dec 6, 2024
1 parent d6a956f commit f7dcbd8
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 @@ -34,6 +34,7 @@ where

import Cardano.Api.Eon.BabbageEraOnwards
import Cardano.Api.Eon.Convert
import Cardano.Api.Eon.MaryEraOnwards
import Cardano.Api.Eon.ShelleyBasedEra (ShelleyBasedEra (..), ShelleyLedgerEra)
import qualified Cardano.Api.Eras as Api
import Cardano.Api.Eras.Core (BabbageEra, ConwayEra, Eon (..))
Expand Down Expand Up @@ -201,6 +202,11 @@ instance Convert Era ShelleyBasedEra where
BabbageEra -> ShelleyBasedEraBabbage
ConwayEra -> ShelleyBasedEraConway

instance Convert Era MaryEraOnwards where
convert = \case
BabbageEra -> MaryEraOnwardsBabbage
ConwayEra -> MaryEraOnwardsConway

instance Convert Era BabbageEraOnwards where
convert = \case
BabbageEra -> BabbageEraOnwardsBabbage
Expand Down

0 comments on commit f7dcbd8

Please sign in to comment.