Skip to content

Commit

Permalink
Use calcMinFeeTx to calculate fees
Browse files Browse the repository at this point in the history
This is higher level and resolves reference scripts itself to find the
ref script bytes (relevant in conway).
  • Loading branch information
ch1bo committed Aug 7, 2024
1 parent 87cc7ba commit fe10891
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions hydra-node/src/Hydra/Chain/Direct/Wallet.hs
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,10 @@ import Cardano.Ledger.Api (
PParams,
Tx,
bodyTxL,
calcMinFeeTx,
coinTxOutL,
collateralInputsTxBodyL,
ensureMinCoinTxOut,
estimateMinFeeTx,
evalTxExUnits,
feeTxBodyL,
inputsTxBodyL,
Expand Down Expand Up @@ -340,7 +340,7 @@ coverFee_ pparams systemStart epochInfo lookupUTxO walletUTxO partialTx = do

-- Compute fee using a body with selected txOut to pay fees (= full change)
-- and an aditional witness (we will sign this tx later)
let fee = estimateMinFeeTx pparams costingTx additionalWitnesses 0 0
let fee = calcMinFeeTx (Ledger.UTxO utxo) pparams costingTx additionalWitnesses
costingTx =
unbalancedTx
& bodyTxL . outputsTxBodyL %~ (|> feeTxOut)
Expand Down

0 comments on commit fe10891

Please sign in to comment.