Skip to content

Commit 49c1660

Browse files
committed
Expose TxFeeEstimationError
1 parent 01f00e7 commit 49c1660

File tree

2 files changed

+7
-0
lines changed
  • cardano-api/src/Cardano/Api/Experimental

2 files changed

+7
-0
lines changed

cardano-api/src/Cardano/Api/Experimental/Tx.hs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -188,6 +188,7 @@ module Cardano.Api.Experimental.Tx
188188
, evaluateTransactionExecutionUnits
189189
, makeTransactionBodyAutoBalance
190190
, TxBodyErrorAutoBalance (..)
191+
, TxFeeEstimationError (..)
191192

192193
-- ** Internal functions
193194
, extractExecutionUnits

cardano-api/src/Cardano/Api/Experimental/Tx/Internal/Fee.hs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313

1414
module Cardano.Api.Experimental.Tx.Internal.Fee
1515
( TxBodyErrorAutoBalance (..)
16+
, TxFeeEstimationError (..)
1617
, collectTxBodyScriptWitnesses
1718
, estimateBalancedTxBody
1819
, evaluateTransactionExecutionUnits
@@ -214,6 +215,11 @@ data TxFeeEstimationError era
214215
| TxFeeEstimationBalanceError (TxBodyErrorAutoBalance (LedgerEra era))
215216
deriving Show
216217

218+
instance Error (TxFeeEstimationError era) where
219+
prettyError = \case
220+
TxFeeEstimationScriptExecutionError e -> prettyError e
221+
TxFeeEstimationBalanceError e -> prettyError e
222+
217223
-- | Use when you do not have access to the UTxOs you intend to spend
218224
estimateBalancedTxBody'
219225
:: forall era

0 commit comments

Comments
 (0)