diff --git a/cardano-cli/src/Cardano/CLI/EraBased/Commands.hs b/cardano-cli/src/Cardano/CLI/EraBased/Commands.hs index f2280e6a9..225fca494 100644 --- a/cardano-cli/src/Cardano/CLI/EraBased/Commands.hs +++ b/cardano-cli/src/Cardano/CLI/EraBased/Commands.hs @@ -11,7 +11,7 @@ module Cardano.CLI.EraBased.Commands ) where -import Cardano.Api (ShelleyBasedEra (..), toCardanoEra) +import Cardano.Api (ShelleyBasedEra (..)) import Cardano.CLI.Commands.Address import Cardano.CLI.Commands.Key @@ -114,12 +114,11 @@ pAnyEraCommand envCli = pCmds :: ShelleyBasedEra era -> EnvCli -> Parser (Cmds era) pCmds sbe' envCli = do - let cEra = toCardanoEra sbe' asum $ catMaybes [ Just (AddressCmds <$> pAddressCmds envCli) , Just (KeyCmds <$> pKeyCmds) - , fmap GenesisCmds <$> pGenesisCmds cEra envCli + , fmap GenesisCmds <$> pGenesisCmds sbe' envCli , fmap GovernanceCmds <$> pGovernanceCmds sbe' , Just (NodeCmds <$> pNodeCmds) , fmap QueryCmds <$> pQueryCmds sbe' envCli diff --git a/cardano-cli/src/Cardano/CLI/EraBased/Options/Genesis.hs b/cardano-cli/src/Cardano/CLI/EraBased/Options/Genesis.hs index 559d3e001..18c64d691 100644 --- a/cardano-cli/src/Cardano/CLI/EraBased/Options/Genesis.hs +++ b/cardano-cli/src/Cardano/CLI/EraBased/Options/Genesis.hs @@ -26,7 +26,7 @@ import qualified Options.Applicative as Opt pGenesisCmds :: () - => CardanoEra era + => ShelleyBasedEra era -> EnvCli -> Maybe (Parser (GenesisCmds era)) pGenesisCmds era envCli = @@ -65,15 +65,18 @@ pGenesisCmds era envCli = subParser "initial-txin" $ Opt.info (pGenesisTxIn envCli) $ Opt.progDesc "Get the TxIn for an initial UTxO based on the verification key" - , forEraInEonMaybe era $ \sbe -> - subParser "create-cardano" $ - Opt.info (pGenesisCreateCardano sbe envCli) $ - Opt.progDesc $ - mconcat - [ "Create a Byron and Shelley genesis file from a genesis " - , "template and genesis/delegation/spending keys." - ] - , forEraInEonMaybe era $ \sbe -> + , forShelleyBasedEraInEonMaybe + era + ( \sbe -> + subParser "create-cardano" $ + Opt.info (pGenesisCreateCardano sbe envCli) $ + Opt.progDesc $ + mconcat + [ "Create a Byron and Shelley genesis file from a genesis " + , "template and genesis/delegation/spending keys." + ] + ) + , forShelleyBasedEraInEonMaybe era $ \sbe -> subParser "create" $ Opt.info (pGenesisCreate sbe envCli) $ Opt.progDesc $ @@ -81,7 +84,7 @@ pGenesisCmds era envCli = [ "Create a Shelley genesis file from a genesis " , "template and genesis/delegation/spending keys." ] - , forEraInEonMaybe era $ \sbe -> + , forShelleyBasedEraInEonMaybe era $ \sbe -> subParser "create-staked" $ Opt.info (pGenesisCreateStaked sbe envCli) $ Opt.progDesc $ @@ -89,7 +92,7 @@ pGenesisCmds era envCli = [ "Create a staked Shelley genesis file from a genesis " , "template and genesis/delegation/spending keys." ] - , forEraInEonMaybe era $ \sbe -> + , forShelleyBasedEraInEonMaybe era $ \sbe -> subParser "create-testnet-data" $ Opt.info (pGenesisCreateTestNetData sbe envCli) $ Opt.progDesc $