Skip to content

Commit

Permalink
fixing redundancy in printing of reference scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
mmontin committed Mar 20, 2024
1 parent de7a420 commit 863ab2b
Showing 1 changed file with 2 additions and 11 deletions.
13 changes: 2 additions & 11 deletions src/Cooked/Pretty/Cooked.hs
Original file line number Diff line number Diff line change
Expand Up @@ -334,18 +334,9 @@ prettyTxSkelInReference opts skelContext txOutRef = do
)

getReferenceScriptDoc :: (IsAbstractOutput output, ToScriptHash (ReferenceScriptType output)) => PrettyCookedOpts -> output -> Maybe DocCooked
getReferenceScriptDoc opts output =
case output ^. outputReferenceScriptL of
Nothing -> Nothing
Just refScript ->
Just $
"Reference script hash:"
<+> prettyHash (pcOptHashes opts) (toHash . toScriptHash $ refScript)
getReferenceScriptDoc opts output = prettyReferenceScriptHash opts . toScriptHash <$> output ^. outputReferenceScriptL

lookupOutput ::
SkelContext ->
Pl.TxOutRef ->
Maybe (Pl.TxOut, Maybe TxSkelOutDatum)
lookupOutput :: SkelContext -> Pl.TxOutRef -> Maybe (Pl.TxOut, Maybe TxSkelOutDatum)
lookupOutput (SkelContext managedTxOuts managedTxSkelOutDatums) txOutRef = do
output <- Map.lookup txOutRef managedTxOuts
return
Expand Down

0 comments on commit 863ab2b

Please sign in to comment.