diff --git a/cabal.project b/cabal.project index c6ce02a7a4..c424b1eddb 100644 --- a/cabal.project +++ b/cabal.project @@ -17,6 +17,7 @@ index-state: , cardano-haskell-packages 2023-08-08T21:04:17Z packages: + ../cardano-api/cardano-api cardano-cli package cardano-cli diff --git a/cardano-cli/src/Cardano/CLI/Run/Legacy/Query.hs b/cardano-cli/src/Cardano/CLI/Run/Legacy/Query.hs index 35c712e60d..f6ddb68da1 100644 --- a/cardano-cli/src/Cardano/CLI/Run/Legacy/Query.hs +++ b/cardano-cli/src/Cardano/CLI/Run/Legacy/Query.hs @@ -463,7 +463,10 @@ runQueryKesPeriodInfo socketPath (AnyConsensusModeParams cModeParams) network no requireNotByronEraInByronMode eraInMode - gParams <- lift (queryGenesisParameters eInMode sbe) + shelleyInMode <- toEraInMode ShelleyEra cMode + & hoistMaybe (ShelleyQueryCmdEraConsensusModeMismatch (AnyConsensusMode cMode) anyE) + + gParams <- lift (queryGenesisParameters shelleyInMode ShelleyBasedEraShelley) & onLeft (left . ShelleyQueryCmdUnsupportedNtcVersion) & onLeft (left . ShelleyQueryCmdLocalStateQueryError . EraMismatchError)