From 528a573140fae33aa2b40f9fae08eff433ce9b92 Mon Sep 17 00:00:00 2001 From: John Ky Date: Thu, 19 Aug 2021 18:46:41 +1000 Subject: [PATCH] Unwrap script validity field in TxBodyContent --- cardano-api/src/Cardano/Api/TxBody.hs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/cardano-api/src/Cardano/Api/TxBody.hs b/cardano-api/src/Cardano/Api/TxBody.hs index dac60fe42e4..12bfc9b9a93 100644 --- a/cardano-api/src/Cardano/Api/TxBody.hs +++ b/cardano-api/src/Cardano/Api/TxBody.hs @@ -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