From e79703a4294ac9da871ad0dcfb01b745aeb95d00 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Hurlin?= Date: Wed, 15 Nov 2023 11:48:23 +0100 Subject: [PATCH] Adapt comments in corresponding Run function --- cardano-cli/src/Cardano/CLI/EraBased/Run/StakeAddress.hs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/cardano-cli/src/Cardano/CLI/EraBased/Run/StakeAddress.hs b/cardano-cli/src/Cardano/CLI/EraBased/Run/StakeAddress.hs index 740d4fd66e..ab1d45586a 100644 --- a/cardano-cli/src/Cardano/CLI/EraBased/Run/StakeAddress.hs +++ b/cardano-cli/src/Cardano/CLI/EraBased/Run/StakeAddress.hs @@ -146,7 +146,7 @@ runStakeAddressRegistrationCertificateCmd sbe stakeIdentifier mDeposit oFp = do createRegistrationCertRequirements :: () => ShelleyBasedEra era -> StakeCredential - -> Maybe Lovelace + -> Maybe Lovelace -- ^ Deposit required in conway era -> Either StakeAddressRegistrationError (StakeAddressRequirements era) createRegistrationCertRequirements sbe stakeCred mdeposit = case sbe of @@ -162,8 +162,10 @@ createRegistrationCertRequirements sbe stakeCred mdeposit = return $ StakeAddrRegistrationPreConway ShelleyToBabbageEraBabbage stakeCred ShelleyBasedEraConway -> case mdeposit of - -- TODO: This error constructor will never be called - Nothing -> Left StakeAddressRegistrationDepositRequired + Nothing -> + -- This case is made impossible by the parser, that distinguishes between Conway + -- and pre-Conway. + Left StakeAddressRegistrationDepositRequired Just dep -> return $ StakeAddrRegistrationConway ConwayEraOnwardsConway dep stakeCred