Skip to content

Commit

Permalink
Merge pull request #785 from IntersectMBO/smelc/future-proof-txbody-c…
Browse files Browse the repository at this point in the history
…ontent-extensions

Future proof against extensions of TxBodyContent
  • Loading branch information
smelc committed Jun 13, 2024
2 parents c68f3ab + 09856b9 commit d39b778
Showing 1 changed file with 25 additions and 21 deletions.
46 changes: 25 additions & 21 deletions cardano-cli/src/Cardano/CLI/Json/Friendly.hs
Original file line number Diff line number Diff line change
Expand Up @@ -166,27 +166,31 @@ friendlyTxBodyImpl :: MonadWarning m
-> m [Aeson.Pair]
friendlyTxBodyImpl
era
tb@(TxBody
TxBodyContent
{ txAuxScripts
, txCertificates
, txExtraKeyWits
, txFee
, txIns
, txInsCollateral
, txMetadata
, txMintValue
, txOuts
, txTotalCollateral
, txReturnCollateral
, txInsReference
, txProposalProcedures
, txVotingProcedures
, txUpdateProposal
, txValidityLowerBound
, txValidityUpperBound
, txWithdrawals
}) =
tb@(TxBody
-- Enumerating the fields, so that we are warned by GHC when we add a new one
(TxBodyContent
txIns
txInsCollateral
txInsReference
txOuts
txTotalCollateral
txReturnCollateral
txFee
txValidityLowerBound
txValidityUpperBound
txMetadata
txAuxScripts
txExtraKeyWits
_txProtocolParams
txWithdrawals
txCertificates
txUpdateProposal
txMintValue
_txScriptValidity
txProposalProcedures
txVotingProcedures
_txCurrentTreasuryValue
_txTreasuryDonation)) =
do redeemerDetails <- redeemerIfShelleyBased era tb
return $ cardanoEraConstraints era
( redeemerDetails ++
Expand Down

0 comments on commit d39b778

Please sign in to comment.