Skip to content

Commit 7444f32

Browse files
authored
Merge pull request #797 from IntersectMBO/mgalazyn/refactor/remove-redundant-function
Remove `createPreviousGovernanceActionId`. Use `GovPurposeId` directly instead.
2 parents 52efcac + d95d1a1 commit 7444f32

3 files changed

Lines changed: 2 additions & 10 deletions

File tree

cardano-api/src/Cardano/Api/Internal/Governance/Actions/ProposalProcedure.hs

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -220,14 +220,6 @@ fromProposalProcedure sbe (Proposal pp) =
220220
, fromGovernanceAction (Gov.pProcGovAction pp)
221221
)
222222

223-
createPreviousGovernanceActionId
224-
:: TxId
225-
-> Word16
226-
-- ^ Governance action transation index
227-
-> Ledger.GovPurposeId (r :: Ledger.GovActionPurpose) (ShelleyLedgerEra era)
228-
createPreviousGovernanceActionId txid index =
229-
Ledger.GovPurposeId $ createGovernanceActionId txid index
230-
231223
createGovernanceActionId :: TxId -> Word16 -> Gov.GovActionId
232224
createGovernanceActionId txid index =
233225
Ledger.GovActionId

cardano-api/src/Cardano/Api/Internal/ReexposeLedger.hs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@ module Cardano.Api.Internal.ReexposeLedger
8383
, GovActionId (..)
8484
, GovActionIx (..)
8585
, GovActionState (..)
86+
, GovPurposeId (..)
8687
, Vote (..)
8788
, Voter (..)
8889
, VotingProcedure (..)
@@ -210,7 +211,7 @@ import Cardano.Ledger.Alonzo.Scripts
210211
, plutusScriptLanguage
211212
)
212213
import Cardano.Ledger.Alonzo.TxWits (TxDats (..))
213-
import Cardano.Ledger.Api (Constitution (..), GovAction (..), unRedeemers)
214+
import Cardano.Ledger.Api (Constitution (..), GovAction (..), GovPurposeId (..), unRedeemers)
214215
import Cardano.Ledger.Api.Tx.Cert
215216
( pattern AuthCommitteeHotKeyTxCert
216217
, pattern DelegStakeTxCert

cardano-api/src/Cardano/Api/Shelley.hs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,6 @@ module Cardano.Api.Shelley
192192

193193
-- * Governance Actions
194194
, createAnchor
195-
, createPreviousGovernanceActionId
196195
, createGovernanceActionId
197196

198197
-- * DRep

0 commit comments

Comments
 (0)