Skip to content

Commit

Permalink
Unwrap script validity field in TxBodyContent
Browse files Browse the repository at this point in the history
  • Loading branch information
newhoggy committed Aug 20, 2021
1 parent af2a59a commit 528a573
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions cardano-api/src/Cardano/Api/TxBody.hs
Original file line number Diff line number Diff line change
Expand Up @@ -1593,12 +1593,12 @@ makeTransactionBody =


pattern TxBody :: TxBodyContent ViewTx era -> TxBody era
pattern TxBody txbodycontent <- (getTxBodyContent TxScriptValidityNone -> txbodycontent)
pattern TxBody txbodycontent <- (getTxBodyContent -> txbodycontent)
{-# COMPLETE TxBody #-}

getTxBodyContent :: TxScriptValidity era -> TxBody era -> TxBodyContent ViewTx era
getTxBodyContent _ (ByronTxBody body) = getByronTxBodyContent body
getTxBodyContent scriptValidity (ShelleyTxBody era body _scripts _redeemers mAux _scriptValidity) =
getTxBodyContent :: TxBody era -> TxBodyContent ViewTx era
getTxBodyContent (ByronTxBody body) = getByronTxBodyContent body
getTxBodyContent (ShelleyTxBody era body _scripts _redeemers mAux scriptValidity) =
fromLedgerTxBody era scriptValidity body mAux


Expand Down

0 comments on commit 528a573

Please sign in to comment.