Skip to content

Commit

Permalink
Improve output of Shelley calculate-min-fee command
Browse files Browse the repository at this point in the history
  • Loading branch information
intricate committed Jul 7, 2020
1 parent da2d61d commit df09296
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions cardano-cli/src/Cardano/CLI/Shelley/Run/Transaction.hs
Expand Up @@ -233,16 +233,16 @@ runTxCalculateMinFee (TxBodyFile txbodyFile) nw pParamsFile

pparams <- readProtocolParameters pParamsFile

let tx = Api.makeSignedTransaction [] txbody
fee = Api.estimateTransactionFee
(fromMaybe Api.Mainnet nw)
(Shelley._minfeeB pparams) --TODO: do this better
(Shelley._minfeeA pparams)
tx
nInputs nOutputs
nByronKeyWitnesses nShelleyKeyWitnesses

liftIO $ putStrLn (show fee :: String)
let tx = Api.makeSignedTransaction [] txbody
Api.Lovelace fee = Api.estimateTransactionFee
(fromMaybe Api.Mainnet nw)
(Shelley._minfeeB pparams) --TODO: do this better
(Shelley._minfeeA pparams)
tx
nInputs nOutputs
nByronKeyWitnesses nShelleyKeyWitnesses

liftIO $ putStrLn $ (show fee :: String) <> " Lovelace"

--TODO: eliminate this and get only the necessary params, and get them in a more
-- helpful way rather than requiring them as a local file.
Expand Down

0 comments on commit df09296

Please sign in to comment.