Skip to content

Commit

Permalink
Merge pull request #250 from input-output-hk/mgalazyn/feature/update-…
Browse files Browse the repository at this point in the history
…description-fields-on-deleg-certs

#221 Update description fields on delegation certificates
  • Loading branch information
carbolymer authored Sep 6, 2023
2 parents 0c682f8 + 67fd850 commit ab42088
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions cardano-cli/src/Cardano/CLI/EraBased/Run/Governance/DRep.hs
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,7 @@ runGovernanceDelegationCertificateCmd stakeIdentifier delegationTarget outFp = d
delegatee <- toLedgerDelegatee target
let req = StakeDelegationRequirementsConwayOnwards cOnwards stakeCred delegatee
delegCert = makeStakeAddressDelegationCertificate req
-- TODO: Conway era - update description to say if its delegating voting stake or "regular" stake
description = Just @TextEnvelopeDescr "Stake Address Delegation Certificate"
description = Just $ toDelegateeEnvelope delegatee
firstExceptT DelegationCertificateWriteFileError
. newExceptT
$ writeLazyByteStringFile outFp
Expand Down Expand Up @@ -125,6 +124,12 @@ toLedgerDelegatee t =
conwayEraOnwardsConstraints cOn $
right $ Ledger.DelegVote $ Ledger.DRepCredential $ Ledger.ScriptHashObj scriptHash

toDelegateeEnvelope :: Ledger.Delegatee ledgerera -> TextEnvelopeDescr
toDelegateeEnvelope = \case
Ledger.DelegStake{} -> "Stake Delegation Certificate"
Ledger.DelegVote{} -> "Vote Delegation Certificate"
Ledger.DelegStakeVote{} -> "Stake and Vote Delegation Certificate"

runGovernanceDRepIdCmd :: ()
=> ConwayEraOnwards era
-> VerificationKeyOrFile DRepKey
Expand Down

0 comments on commit ab42088

Please sign in to comment.