From d2aca1e621e0e4890a453a50b9fa1af766bad2d4 Mon Sep 17 00:00:00 2001 From: Neil Mayhew Date: Tue, 10 Dec 2024 08:53:00 -0700 Subject: [PATCH] cardano-api upgrade: use convert instead of deprecated conwayEraOnwardsToShelleyBasedEra --- cardano-testnet/src/Testnet/Components/Query.hs | 2 +- cardano-testnet/src/Testnet/Process/Cli/DRep.hs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/cardano-testnet/src/Testnet/Components/Query.hs b/cardano-testnet/src/Testnet/Components/Query.hs index 4977c04d37f..2697b150a81 100644 --- a/cardano-testnet/src/Testnet/Components/Query.hs +++ b/cardano-testnet/src/Testnet/Components/Query.hs @@ -465,7 +465,7 @@ getGovState -> m (L.ConwayGovState (ShelleyLedgerEra era)) -- ^ The governance state getGovState epochStateView ceo = withFrozenCallStack $ do AnyNewEpochState sbe' newEpochState <- getEpochState epochStateView - let sbe = conwayEraOnwardsToShelleyBasedEra ceo + let sbe = convert ceo Refl <- H.leftFail $ assertErasEqual sbe sbe' pure $ conwayEraOnwardsConstraints ceo $ newEpochState ^. L.newEpochStateGovStateL diff --git a/cardano-testnet/src/Testnet/Process/Cli/DRep.hs b/cardano-testnet/src/Testnet/Process/Cli/DRep.hs index 23ae6e90f98..cf3a1ba7c31 100644 --- a/cardano-testnet/src/Testnet/Process/Cli/DRep.hs +++ b/cardano-testnet/src/Testnet/Process/Cli/DRep.hs @@ -227,7 +227,7 @@ registerDRep -- as returned by 'cardanoTestnetDefault'. -> m (KeyPair PaymentKey) registerDRep execConfig epochStateView ceo work prefix wallet = do - let sbe = conwayEraOnwardsToShelleyBasedEra ceo + let sbe = convert ceo era = toCardanoEra sbe cEra = AnyCardanoEra era @@ -354,7 +354,7 @@ makeActivityChangeProposal makeActivityChangeProposal execConfig epochStateView ceo work prevGovActionInfo drepActivity stakeKeyPair wallet timeout = do - let sbe = conwayEraOnwardsToShelleyBasedEra ceo + let sbe = convert ceo era = toCardanoEra sbe cEra = AnyCardanoEra era KeyPair{verificationKey=File stakeVkeyFp} = stakeKeyPair