From a9e6363c26f270f1349dd43c7c94a6be90153f35 Mon Sep 17 00:00:00 2001 From: John Ky Date: Fri, 29 Sep 2023 10:52:52 +1000 Subject: [PATCH] Use caseShelleyToBabbageOrConwayEraOnwards from cardano-api --- .../src/Cardano/CLI/EraBased/Run/StakeAddress.hs | 16 +--------------- 1 file changed, 1 insertion(+), 15 deletions(-) diff --git a/cardano-cli/src/Cardano/CLI/EraBased/Run/StakeAddress.hs b/cardano-cli/src/Cardano/CLI/EraBased/Run/StakeAddress.hs index 2dc13d7df0..781e5c7ace 100644 --- a/cardano-cli/src/Cardano/CLI/EraBased/Run/StakeAddress.hs +++ b/cardano-cli/src/Cardano/CLI/EraBased/Run/StakeAddress.hs @@ -192,20 +192,6 @@ runStakeAddressStakeDelegationCertificateCmd sbe stakeVerifier poolVKeyOrHashOrF $ writeLazyByteStringFile outFp $ textEnvelopeToJSON (Just @TextEnvelopeDescr "Stake Address Delegation Certificate") certificate --- TODO use the version in cardano-api -caseShelleyToBabbageAndConwayEraOnwards :: forall a era. () - => (ShelleyToBabbageEra era -> a) - -> (ConwayEraOnwards era -> a) - -> ShelleyBasedEra era - -> a -caseShelleyToBabbageAndConwayEraOnwards l r = \case - ShelleyBasedEraShelley -> l ShelleyToBabbageEraShelley - ShelleyBasedEraAllegra -> l ShelleyToBabbageEraAllegra - ShelleyBasedEraMary -> l ShelleyToBabbageEraMary - ShelleyBasedEraAlonzo -> l ShelleyToBabbageEraAlonzo - ShelleyBasedEraBabbage -> l ShelleyToBabbageEraBabbage - ShelleyBasedEraConway -> r ConwayEraOnwardsConway - runStakeAddressStakeAndVoteDelegationCertificateCmd :: () => ConwayEraOnwards era -> StakeIdentifier @@ -276,7 +262,7 @@ createStakeDelegationCertificate :: forall era. () -> ShelleyBasedEra era -> Certificate era createStakeDelegationCertificate stakeCredential (StakePoolKeyHash poolStakeVKeyHash) = do - caseShelleyToBabbageAndConwayEraOnwards + caseShelleyToBabbageOrConwayEraOnwards (\w -> shelleyToBabbageEraConstraints w $ ShelleyRelatedCertificate w