Skip to content

Commit

Permalink
Fix #796 - make --fee mandatory in legacy transaction build-raw
Browse files Browse the repository at this point in the history
  • Loading branch information
carbolymer committed Jun 21, 2024
1 parent 202d13e commit 811de9d
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion cardano-cli/src/Cardano/CLI/Legacy/Commands/Transaction.hs
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ data LegacyTransactionCmds
-- ^ Transaction lower bound
(Maybe SlotNo)
-- ^ Transaction upper bound
(Maybe Coin)
Coin
-- ^ Tx fee
[(CertificateFile, Maybe (ScriptWitnessFiles WitCtxStake))]
-- ^ Certificates with potential script witness
Expand Down
2 changes: 1 addition & 1 deletion cardano-cli/src/Cardano/CLI/Legacy/Options.hs
Original file line number Diff line number Diff line change
Expand Up @@ -364,7 +364,7 @@ pTransaction envCli =
<*> optional (pMintMultiAsset ManualBalance)
<*> optional pInvalidBefore
<*> optional pLegacyInvalidHereafter
<*> optional pTxFee
<*> pTxFee
<*> many (pCertificateFile ManualBalance )
<*> many (pWithdrawal ManualBalance)
<*> pTxMetadataJsonSchema
Expand Down
5 changes: 2 additions & 3 deletions cardano-cli/src/Cardano/CLI/Legacy/Run/Transaction.hs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ import Cardano.CLI.Types.Errors.TxValidationError
import Cardano.CLI.Types.Governance

import Data.Function
import Data.Maybe

runLegacyTransactionCmds :: LegacyTransactionCmds -> ExceptT TxCmdError IO ()
runLegacyTransactionCmds = \case
Expand Down Expand Up @@ -135,7 +134,7 @@ runLegacyTransactionBuildRawCmd :: ()
-> Maybe (Value, [ScriptWitnessFiles WitCtxMint]) -- ^ Multi-Asset value with script witness
-> Maybe SlotNo -- ^ Validity lower bound
-> Maybe SlotNo -- ^ Validity upper bound
-> Maybe Coin -- ^ Tx fee
-> Coin -- ^ Tx fee
-> [(CertificateFile, Maybe (ScriptWitnessFiles WitCtxStake))]
-> [(StakeAddress, Coin, Maybe (ScriptWitnessFiles WitCtxStake))]
-> TxMetadataJsonSchema
Expand Down Expand Up @@ -176,7 +175,7 @@ runLegacyTransactionBuildRawCmd
runTransactionBuildRawCmd
( Cmd.TransactionBuildRawCmdArgs
sbe mScriptValidity txins readOnlyRefIns txinsc mReturnColl
mTotColl reqSigners txouts mValue mLowBound upperBound (fromMaybe 0 fee) certs wdrls
mTotColl reqSigners txouts mValue mLowBound upperBound fee certs wdrls
metadataSchema scriptFiles metadataFiles mProtocolParamsFile mUpdateProposalFile [] []
outFile
)
Expand Down

0 comments on commit 811de9d

Please sign in to comment.