Skip to content

Commit

Permalink
renderTxWithUTxO: add returnCollateralLines
Browse files Browse the repository at this point in the history
  • Loading branch information
locallycompact committed Nov 26, 2024
1 parent 4b93429 commit a42125a
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions hydra-cardano-api/src/Hydra/Cardano/Api/Pretty.hs
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@ renderTxWithUTxO utxo (Tx body _wits) =
<> [""]
<> totalCollateralLines
<> [""]
<> returnCollateralLines
<> [""]
<> validityLines
<> [""]
<> mintLines
Expand Down Expand Up @@ -124,6 +126,17 @@ renderTxWithUTxO utxo (Tx body _wits) =
Api.TxTotalCollateralNone -> "None"
Api.TxTotalCollateral _ x -> show x

returnCollateralLines :: [String]
returnCollateralLines =
[ "== RETURN COLLATERAL"
, renderReturnCollateral $ txReturnCollateral content
]

renderReturnCollateral :: TxReturnCollateral CtxTx era -> String
renderReturnCollateral = \case
Api.TxReturnCollateralNone -> "None"
Api.TxReturnCollateral _ x -> show x

validityLines =
[ "== VALIDITY"
, show (txValidityLowerBound content)
Expand Down

0 comments on commit a42125a

Please sign in to comment.