Skip to content

Commit

Permalink
Make "transaction view" command fail and advice to use "debug transac…
Browse files Browse the repository at this point in the history
…tion view" instead
  • Loading branch information
smelc committed Aug 6, 2024
1 parent 7062433 commit cdc61ce
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 18 deletions.
3 changes: 0 additions & 3 deletions cardano-cli/src/Cardano/CLI/Legacy/Commands/Transaction.hs
Original file line number Diff line number Diff line change
Expand Up @@ -135,9 +135,6 @@ data LegacyTransactionCmds
| TransactionTxIdCmd
InputTxBodyOrTxFile
| TransactionViewCmd
ViewOutputFormat
(Maybe (File () Out))
InputTxBodyOrTxFile

renderLegacyTransactionCmds :: LegacyTransactionCmds -> Text
renderLegacyTransactionCmds = \case
Expand Down
7 changes: 2 additions & 5 deletions cardano-cli/src/Cardano/CLI/Legacy/Options.hs
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,7 @@ pTransaction envCli =
(Opt.info pTransactionId $ Opt.progDesc "Print a transaction identifier.")
, subParser "view" $
Opt.info pTransactionView $
Opt.progDesc "Print a transaction."
Opt.progDesc "This command has been removed. Please use \"debug transaction view\" instead."
]
where
-- Backwards compatible parsers
Expand Down Expand Up @@ -488,10 +488,7 @@ pTransaction envCli =

pTransactionView :: Parser LegacyTransactionCmds
pTransactionView =
TransactionViewCmd
<$> pTxViewOutputFormat
<*> pMaybeOutputFile
<*> pInputTxOrTxBodyFile
pure TransactionViewCmd

pNodeCmds :: Parser LegacyNodeCmds
pNodeCmds =
Expand Down
16 changes: 6 additions & 10 deletions cardano-cli/src/Cardano/CLI/Legacy/Run/Transaction.hs
Original file line number Diff line number Diff line change
Expand Up @@ -152,8 +152,8 @@ runLegacyTransactionCmds = \case
runLegacyTransactionHashScriptDataCmd scriptDataOrFile
TransactionTxIdCmd txinfile ->
runLegacyTransactionTxIdCmd txinfile
TransactionViewCmd yamlOrJson mOutFile txinfile ->
runLegacyTransactionViewCmd yamlOrJson mOutFile txinfile
TransactionViewCmd ->
runLegacyTransactionViewCmd
TransactionPolicyIdCmd sFile ->
runLegacyTransactionPolicyIdCmd sFile
TransactionWitnessCmd txBodyfile witSignData mbNw outFile ->
Expand Down Expand Up @@ -508,14 +508,10 @@ runLegacyTransactionTxIdCmd txfile =
txfile
)

runLegacyTransactionViewCmd
:: ViewOutputFormat -> Maybe (File () Out) -> InputTxBodyOrTxFile -> ExceptT TxCmdError IO ()
runLegacyTransactionViewCmd
_yamlOrJson
_mOutFile
_inputTxBodyOrTxFile =
runTransactionViewCmd
Cmd.TransactionViewCmdArgs
runLegacyTransactionViewCmd :: ExceptT TxCmdError IO ()
runLegacyTransactionViewCmd =
runTransactionViewCmd
Cmd.TransactionViewCmdArgs

runLegacyTransactionWitnessCmd
:: ()
Expand Down

0 comments on commit cdc61ce

Please sign in to comment.