Skip to content

Commit

Permalink
Rename txVotes in TxBodyContents to txVotingProcedures to match ledger
Browse files Browse the repository at this point in the history
  • Loading branch information
newhoggy committed Aug 25, 2023
1 parent 2011e2e commit 7b5d25e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions cardano-api/gen/Test/Gen/Cardano/Api/Typed.hs
Original file line number Diff line number Diff line change
Expand Up @@ -671,7 +671,7 @@ genTxBodyContent era = do
txMintValue <- genTxMintValue era
txScriptValidity <- genTxScriptValidity era
txGovernanceActions <- genTxGovernanceActions era
txVotes <- genMaybeFeaturedInEra genVotingProcedures era
txVotingProcedures <- genMaybeFeaturedInEra genVotingProcedures era
pure $ TxBodyContent
{ Api.txIns
, Api.txInsCollateral
Expand All @@ -691,7 +691,7 @@ genTxBodyContent era = do
, Api.txMintValue
, Api.txScriptValidity
, Api.txGovernanceActions
, Api.txVotes
, Api.txVotingProcedures
}

genTxInsCollateral :: CardanoEra era -> Gen (TxInsCollateral era)
Expand Down
12 changes: 6 additions & 6 deletions cardano-api/internal/Cardano/Api/TxBody.hs
Original file line number Diff line number Diff line change
Expand Up @@ -1759,7 +1759,7 @@ data TxBodyContent build era =
txMintValue :: TxMintValue build era,
txScriptValidity :: TxScriptValidity era,
txGovernanceActions :: TxGovernanceActions era,
txVotes :: Maybe (Featured ConwayEraOnwards era (VotingProcedures era))
txVotingProcedures :: Maybe (Featured ConwayEraOnwards era (VotingProcedures era))
}
deriving (Eq, Show)

Expand All @@ -1783,7 +1783,7 @@ defaultTxBodyContent = TxBodyContent
, txMintValue = TxMintNone
, txScriptValidity = TxScriptValidityNone
, txGovernanceActions = TxGovernanceActionsNone
, txVotes = Nothing
, txVotingProcedures = Nothing
}

setTxIns :: TxIns build era -> TxBodyContent build era -> TxBodyContent build era
Expand Down Expand Up @@ -2720,7 +2720,7 @@ fromLedgerTxBody sbe scriptValidity body scriptdata mAux =
, txAuxScripts
, txScriptValidity = scriptValidity
, txGovernanceActions = fromLedgerProposalProcedure sbe body
, txVotes = fromLedgerVotingProcedures sbe body
, txVotingProcedures = fromLedgerVotingProcedures sbe body
}
where
(txMetadata, txAuxScripts) = fromLedgerTxAuxiliaryData sbe mAux
Expand Down Expand Up @@ -3427,7 +3427,7 @@ getByronTxBodyContent (Annotated Byron.UnsafeTx{txInputs, txOutputs} _) =
, txMintValue = TxMintNone
, txScriptValidity = TxScriptValidityNone
, txGovernanceActions = TxGovernanceActionsNone
, txVotes = Nothing
, txVotingProcedures = Nothing
}

convTxIns :: TxIns BuildTx era -> Set (L.TxIn StandardCrypto)
Expand Down Expand Up @@ -3955,7 +3955,7 @@ makeShelleyTransactionBody sbe@ShelleyBasedEraConway
txCertificates,
txMintValue,
txScriptValidity,
txVotes,
txVotingProcedures,
txGovernanceActions
} = do

Expand All @@ -3976,7 +3976,7 @@ makeShelleyTransactionBody sbe@ShelleyBasedEraConway
& L.reqSignerHashesTxBodyL .~ convExtraKeyWitnesses txExtraKeyWits
& L.mintTxBodyL .~ convMintValue txMintValue
& L.scriptIntegrityHashTxBodyL .~ scriptIntegrityHash
& L.votingProceduresTxBodyL .~ unVotingProcedures @era (maybe mempty unFeatured txVotes)
& L.votingProceduresTxBodyL .~ unVotingProcedures @era (maybe emptyVotingProcedures unFeatured txVotingProcedures)
& L.proposalProceduresTxBodyL .~ convGovActions txGovernanceActions
-- TODO Conway: support optional network id in TxBodyContent
-- & L.networkIdTxBodyL .~ SNothing
Expand Down

0 comments on commit 7b5d25e

Please sign in to comment.