diff --git a/cardano-cli/src/Cardano/CLI/Compatible/Transaction/Run.hs b/cardano-cli/src/Cardano/CLI/Compatible/Transaction/Run.hs index e488964a05..77308ba5de 100644 --- a/cardano-cli/src/Cardano/CLI/Compatible/Transaction/Run.hs +++ b/cardano-cli/src/Cardano/CLI/Compatible/Transaction/Run.hs @@ -211,10 +211,10 @@ mkTxCertificatesSbe era certs = Exp.TxCertificates . OMap.fromList $ map getStak getStakeCred :: (Exp.Certificate (ShelleyLedgerEra era), Exp.AnyWitness (ShelleyLedgerEra era)) -> ( Exp.Certificate (ShelleyLedgerEra era) - , Maybe (StakeCredential, Exp.AnyWitness (ShelleyLedgerEra era)) + , Maybe (Exp.AnyWitness (ShelleyLedgerEra era)) ) getStakeCred (c@(Exp.Certificate cert), wit) = - (c, (,wit) <$> Compatible.getTxCertWitness (convert era) cert) + (c, wit <$ Compatible.getTxCertWitness (convert era) cert) readUpdateProposalFile :: Featured ShelleyToBabbageEra era (Maybe UpdateProposalFile) diff --git a/cardano-cli/src/Cardano/CLI/Read/Committee/ColdKey.hs b/cardano-cli/src/Cardano/CLI/Read/Committee/ColdKey.hs index 026248ec80..691660a051 100644 --- a/cardano-cli/src/Cardano/CLI/Read/Committee/ColdKey.hs +++ b/cardano-cli/src/Cardano/CLI/Read/Committee/ColdKey.hs @@ -22,6 +22,7 @@ import Cardano.Prelude qualified as Text import Prelude import Data.Validation +import Data.Either qualified as Either data AnyCommitteeColdVerificationKey where AnyCommitteeColdVerificationKey @@ -35,11 +36,11 @@ readCommitteeColdBech32VerificationKeyText :: Text -> Validation [Bech32DecodeError] AnyCommitteeColdVerificationKey readCommitteeColdBech32VerificationKeyText committeeColdText = let vkey = - liftError return $ + Either.either (Failure . return) Success $ AnyCommitteeColdVerificationKey <$> deserialiseFromBech32 committeeColdText extendedVkey = - liftError return $ + Either.either (Failure . return) Success $ AnyCommitteeColdExtendedVerificationKey <$> deserialiseFromBech32 committeeColdText in vkey <> extendedVkey @@ -49,11 +50,11 @@ readCommitteeColdHexVerificationKeyText readCommitteeColdHexVerificationKeyText committeeColdText = let committeeColdBs = Text.encodeUtf8 committeeColdText vkey = - liftError return $ + Either.either (Failure . return) Success $ AnyCommitteeColdVerificationKey <$> deserialiseFromRawBytesHex committeeColdBs extendedVkey = - liftError return $ + Either.either (Failure . return) Success $ AnyCommitteeColdExtendedVerificationKey <$> deserialiseFromRawBytesHex committeeColdBs in vkey <> extendedVkey diff --git a/cardano-cli/src/Cardano/CLI/Read/Committee/HotKey.hs b/cardano-cli/src/Cardano/CLI/Read/Committee/HotKey.hs index 61ebf39573..b8c7799671 100644 --- a/cardano-cli/src/Cardano/CLI/Read/Committee/HotKey.hs +++ b/cardano-cli/src/Cardano/CLI/Read/Committee/HotKey.hs @@ -22,6 +22,7 @@ import Cardano.Prelude qualified as Text import Prelude import Data.Validation +import Data.Either qualified as Either data AnyCommitteeHotVerificationKey where AnyCommitteeHotVerificationKey :: VerificationKey CommitteeHotKey -> AnyCommitteeHotVerificationKey @@ -34,11 +35,11 @@ readCommitteeHotBech32VerificationKeyText :: Text -> Validation [Bech32DecodeError] AnyCommitteeHotVerificationKey readCommitteeHotBech32VerificationKeyText committeeHot = let vkey = - liftError return $ + Either.either (Failure . return) Success $ AnyCommitteeHotVerificationKey <$> deserialiseFromBech32 committeeHot extendedVkey = - liftError return $ + Either.either (Failure . return) Success $ AnyCommitteeHotExtendedVerificationKey <$> deserialiseFromBech32 committeeHot in vkey <> extendedVkey @@ -48,11 +49,11 @@ readCommitteeHotHexVerificationKeyText readCommitteeHotHexVerificationKeyText committeeHotText = let committeeHotBs = Text.encodeUtf8 committeeHotText vkey = - liftError return $ + Either.either (Failure . return) Success $ AnyCommitteeHotVerificationKey <$> deserialiseFromRawBytesHex committeeHotBs extendedVkey = - liftError return $ + Either.either (Failure . return) Success $ AnyCommitteeHotExtendedVerificationKey <$> deserialiseFromRawBytesHex committeeHotBs in vkey <> extendedVkey diff --git a/cardano-cli/src/Cardano/CLI/Read/DRep.hs b/cardano-cli/src/Cardano/CLI/Read/DRep.hs index a0655d158d..01e6c55f9c 100644 --- a/cardano-cli/src/Cardano/CLI/Read/DRep.hs +++ b/cardano-cli/src/Cardano/CLI/Read/DRep.hs @@ -22,6 +22,7 @@ import Cardano.Prelude qualified as Text import Prelude import Data.Validation +import Data.Either qualified as Either data AnyDrepVerificationKey where AnyDrepVerificationKey :: VerificationKey DRepKey -> AnyDrepVerificationKey @@ -32,10 +33,10 @@ deriving instance Show AnyDrepVerificationKey readDRepBech32VerificationKeyText :: Text -> Validation [Bech32DecodeError] AnyDrepVerificationKey readDRepBech32VerificationKeyText drep = let vkey = - liftError return $ + Either.either (Failure . return) Success $ AnyDrepVerificationKey <$> deserialiseFromBech32 drep extendedVkey = - liftError return $ + Either.either (Failure . return) Success $ AnyDrepExtendedVerificationKey <$> deserialiseFromBech32 drep in vkey <> extendedVkey @@ -43,10 +44,10 @@ readDRepHexVerificationKeyText :: Text -> Validation [RawBytesHexError] AnyDrepV readDRepHexVerificationKeyText drepText = let drepBs = Text.encodeUtf8 drepText vkey = - liftError return $ + Either.either (Failure . return) Success $ AnyDrepVerificationKey <$> deserialiseFromRawBytesHex drepBs extendedVkey = - liftError return $ + Either.either (Failure . return) Success $ AnyDrepExtendedVerificationKey <$> deserialiseFromRawBytesHex drepBs in vkey <> extendedVkey