Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions cardano-cli/src/Cardano/CLI/Compatible/Transaction/Run.hs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
9 changes: 5 additions & 4 deletions cardano-cli/src/Cardano/CLI/Read/Committee/ColdKey.hs
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
import Prelude

import Data.Validation
import Data.Either qualified as Either

data AnyCommitteeColdVerificationKey where
AnyCommitteeColdVerificationKey
Expand All @@ -35,13 +36,13 @@
:: Text -> Validation [Bech32DecodeError] AnyCommitteeColdVerificationKey
readCommitteeColdBech32VerificationKeyText committeeColdText =
let vkey =
liftError return $
Either.either (Failure . return) Success $
AnyCommitteeColdVerificationKey
<$> deserialiseFromBech32 committeeColdText

Check warning

Code scanning / HLint

Redundant <$> Warning

cardano-cli/src/Cardano/CLI/Read/Committee/ColdKey.hs:(39,9)-(41,55): Warning: Redundant <$>
  
Found:
  Either.either (Failure . return) Success
    $ AnyCommitteeColdVerificationKey
        <$> deserialiseFromBech32 committeeColdText
  
Perhaps:
  either
    (Failure . return) (Success . AnyCommitteeColdVerificationKey)
    (deserialiseFromBech32 committeeColdText)
extendedVkey =
liftError return $
Either.either (Failure . return) Success $
Comment on lines +39 to +43
AnyCommitteeColdExtendedVerificationKey
<$> deserialiseFromBech32 committeeColdText

Check warning

Code scanning / HLint

Redundant <$> Warning

cardano-cli/src/Cardano/CLI/Read/Committee/ColdKey.hs:(43,9)-(45,55): Warning: Redundant <$>
  
Found:
  Either.either (Failure . return) Success
    $ AnyCommitteeColdExtendedVerificationKey
        <$> deserialiseFromBech32 committeeColdText
  
Perhaps:
  either
    (Failure . return)
    (Success . AnyCommitteeColdExtendedVerificationKey)
    (deserialiseFromBech32 committeeColdText)
in vkey <> extendedVkey

readCommitteeColdHexVerificationKeyText
Expand All @@ -49,13 +50,13 @@
readCommitteeColdHexVerificationKeyText committeeColdText =
let committeeColdBs = Text.encodeUtf8 committeeColdText
vkey =
liftError return $
Either.either (Failure . return) Success $
AnyCommitteeColdVerificationKey
<$> deserialiseFromRawBytesHex committeeColdBs

Check warning

Code scanning / HLint

Redundant <$> Warning

cardano-cli/src/Cardano/CLI/Read/Committee/ColdKey.hs:(53,9)-(55,58): Warning: Redundant <$>
  
Found:
  Either.either (Failure . return) Success
    $ AnyCommitteeColdVerificationKey
        <$> deserialiseFromRawBytesHex committeeColdBs
  
Perhaps:
  either
    (Failure . return) (Success . AnyCommitteeColdVerificationKey)
    (deserialiseFromRawBytesHex committeeColdBs)
extendedVkey =
liftError return $
Either.either (Failure . return) Success $
AnyCommitteeColdExtendedVerificationKey
<$> deserialiseFromRawBytesHex committeeColdBs

Check warning

Code scanning / HLint

Redundant <$> Warning

cardano-cli/src/Cardano/CLI/Read/Committee/ColdKey.hs:(57,9)-(59,58): Warning: Redundant <$>
  
Found:
  Either.either (Failure . return) Success
    $ AnyCommitteeColdExtendedVerificationKey
        <$> deserialiseFromRawBytesHex committeeColdBs
  
Perhaps:
  either
    (Failure . return)
    (Success . AnyCommitteeColdExtendedVerificationKey)
    (deserialiseFromRawBytesHex committeeColdBs)
in vkey <> extendedVkey

readCommitteeColdVerificationKeyFile
Expand Down
9 changes: 5 additions & 4 deletions cardano-cli/src/Cardano/CLI/Read/Committee/HotKey.hs
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
import Prelude

import Data.Validation
import Data.Either qualified as Either

data AnyCommitteeHotVerificationKey where
AnyCommitteeHotVerificationKey :: VerificationKey CommitteeHotKey -> AnyCommitteeHotVerificationKey
Expand All @@ -34,13 +35,13 @@
:: Text -> Validation [Bech32DecodeError] AnyCommitteeHotVerificationKey
readCommitteeHotBech32VerificationKeyText committeeHot =
let vkey =
liftError return $
Either.either (Failure . return) Success $
AnyCommitteeHotVerificationKey
<$> deserialiseFromBech32 committeeHot

Check warning

Code scanning / HLint

Redundant <$> Warning

cardano-cli/src/Cardano/CLI/Read/Committee/HotKey.hs:(38,9)-(40,50): Warning: Redundant <$>
  
Found:
  Either.either (Failure . return) Success
    $ AnyCommitteeHotVerificationKey
        <$> deserialiseFromBech32 committeeHot
  
Perhaps:
  either
    (Failure . return) (Success . AnyCommitteeHotVerificationKey)
    (deserialiseFromBech32 committeeHot)
extendedVkey =
liftError return $
Either.either (Failure . return) Success $
Comment on lines +38 to +42
AnyCommitteeHotExtendedVerificationKey
<$> deserialiseFromBech32 committeeHot

Check warning

Code scanning / HLint

Redundant <$> Warning

cardano-cli/src/Cardano/CLI/Read/Committee/HotKey.hs:(42,9)-(44,50): Warning: Redundant <$>
  
Found:
  Either.either (Failure . return) Success
    $ AnyCommitteeHotExtendedVerificationKey
        <$> deserialiseFromBech32 committeeHot
  
Perhaps:
  either
    (Failure . return)
    (Success . AnyCommitteeHotExtendedVerificationKey)
    (deserialiseFromBech32 committeeHot)
in vkey <> extendedVkey

readCommitteeHotHexVerificationKeyText
Expand All @@ -48,13 +49,13 @@
readCommitteeHotHexVerificationKeyText committeeHotText =
let committeeHotBs = Text.encodeUtf8 committeeHotText
vkey =
liftError return $
Either.either (Failure . return) Success $
AnyCommitteeHotVerificationKey
<$> deserialiseFromRawBytesHex committeeHotBs

Check warning

Code scanning / HLint

Redundant <$> Warning

cardano-cli/src/Cardano/CLI/Read/Committee/HotKey.hs:(52,9)-(54,57): Warning: Redundant <$>
  
Found:
  Either.either (Failure . return) Success
    $ AnyCommitteeHotVerificationKey
        <$> deserialiseFromRawBytesHex committeeHotBs
  
Perhaps:
  either
    (Failure . return) (Success . AnyCommitteeHotVerificationKey)
    (deserialiseFromRawBytesHex committeeHotBs)
extendedVkey =
liftError return $
Either.either (Failure . return) Success $
AnyCommitteeHotExtendedVerificationKey
<$> deserialiseFromRawBytesHex committeeHotBs

Check warning

Code scanning / HLint

Redundant <$> Warning

cardano-cli/src/Cardano/CLI/Read/Committee/HotKey.hs:(56,9)-(58,57): Warning: Redundant <$>
  
Found:
  Either.either (Failure . return) Success
    $ AnyCommitteeHotExtendedVerificationKey
        <$> deserialiseFromRawBytesHex committeeHotBs
  
Perhaps:
  either
    (Failure . return)
    (Success . AnyCommitteeHotExtendedVerificationKey)
    (deserialiseFromRawBytesHex committeeHotBs)
in vkey <> extendedVkey

readCommitteeHotVerificationKeyFile
Expand Down
9 changes: 5 additions & 4 deletions cardano-cli/src/Cardano/CLI/Read/DRep.hs
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
import Prelude

import Data.Validation
import Data.Either qualified as Either

data AnyDrepVerificationKey where
AnyDrepVerificationKey :: VerificationKey DRepKey -> AnyDrepVerificationKey
Expand All @@ -32,23 +33,23 @@
readDRepBech32VerificationKeyText :: Text -> Validation [Bech32DecodeError] AnyDrepVerificationKey
readDRepBech32VerificationKeyText drep =
let vkey =
liftError return $
Either.either (Failure . return) Success $
AnyDrepVerificationKey <$> deserialiseFromBech32 drep

Check warning

Code scanning / HLint

Redundant <$> Warning

cardano-cli/src/Cardano/CLI/Read/DRep.hs:(36,9)-(37,63): Warning: Redundant <$>
  
Found:
  Either.either (Failure . return) Success
    $ AnyDrepVerificationKey <$> deserialiseFromBech32 drep
  
Perhaps:
  either
    (Failure . return) (Success . AnyDrepVerificationKey)
    (deserialiseFromBech32 drep)
extendedVkey =
liftError return $
Either.either (Failure . return) Success $
AnyDrepExtendedVerificationKey <$> deserialiseFromBech32 drep

Check warning

Code scanning / HLint

Redundant <$> Warning

cardano-cli/src/Cardano/CLI/Read/DRep.hs:(39,9)-(40,71): Warning: Redundant <$>
  
Found:
  Either.either (Failure . return) Success
    $ AnyDrepExtendedVerificationKey <$> deserialiseFromBech32 drep
  
Perhaps:
  either
    (Failure . return) (Success . AnyDrepExtendedVerificationKey)
    (deserialiseFromBech32 drep)
Comment on lines +36 to 40
in vkey <> extendedVkey

readDRepHexVerificationKeyText :: Text -> Validation [RawBytesHexError] AnyDrepVerificationKey
readDRepHexVerificationKeyText drepText =
let drepBs = Text.encodeUtf8 drepText
vkey =
liftError return $
Either.either (Failure . return) Success $
AnyDrepVerificationKey <$> deserialiseFromRawBytesHex drepBs

Check warning

Code scanning / HLint

Redundant <$> Warning

cardano-cli/src/Cardano/CLI/Read/DRep.hs:(47,9)-(48,70): Warning: Redundant <$>
  
Found:
  Either.either (Failure . return) Success
    $ AnyDrepVerificationKey <$> deserialiseFromRawBytesHex drepBs
  
Perhaps:
  either
    (Failure . return) (Success . AnyDrepVerificationKey)
    (deserialiseFromRawBytesHex drepBs)
extendedVkey =
liftError return $
Either.either (Failure . return) Success $
AnyDrepExtendedVerificationKey
<$> deserialiseFromRawBytesHex drepBs

Check warning

Code scanning / HLint

Redundant <$> Warning

cardano-cli/src/Cardano/CLI/Read/DRep.hs:(50,9)-(52,49): Warning: Redundant <$>
  
Found:
  Either.either (Failure . return) Success
    $ AnyDrepExtendedVerificationKey
        <$> deserialiseFromRawBytesHex drepBs
  
Perhaps:
  either
    (Failure . return) (Success . AnyDrepExtendedVerificationKey)
    (deserialiseFromRawBytesHex drepBs)
in vkey <> extendedVkey

readDrepVerificationKeyFile
Expand Down
Loading