Skip to content

Commit

Permalink
Remove era|legacy transaction view
Browse files Browse the repository at this point in the history
  • Loading branch information
smelc committed Aug 22, 2024
1 parent fd7a3d0 commit 44956a8
Show file tree
Hide file tree
Showing 6 changed files with 0 additions and 38 deletions.
2 changes: 0 additions & 2 deletions cardano-cli/src/Cardano/CLI/EraBased/Commands/Transaction.hs
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ data TransactionCmds era
| TransactionCalculateMinValueCmd !(TransactionCalculateMinValueCmdArgs era)
| TransactionHashScriptDataCmd !TransactionHashScriptDataCmdArgs
| TransactionTxIdCmd !TransactionTxIdCmdArgs
| TransactionViewCmd !TransactionViewCmdArgs

data TransactionBuildRawCmdArgs era = TransactionBuildRawCmdArgs
{ eon :: !(ShelleyBasedEra era)
Expand Down Expand Up @@ -264,4 +263,3 @@ renderTransactionCmds = \case
TransactionCalculateMinValueCmd{} -> "transaction calculate-min-value"
TransactionHashScriptDataCmd{} -> "transaction hash-script-data"
TransactionTxIdCmd{} -> "transaction txid"
TransactionViewCmd{} -> "transaction view"
5 changes: 0 additions & 5 deletions cardano-cli/src/Cardano/CLI/EraBased/Options/Transaction.hs
Original file line number Diff line number Diff line change
Expand Up @@ -97,11 +97,6 @@ pTransactionCmds era envCli =
subParser "txid" $
Opt.info pTransactionId $
Opt.progDesc "Print a transaction identifier."
, Just $
subParser "view" $
Opt.info
(pure $ TransactionViewCmd TransactionViewCmdArgs)
(Opt.progDesc "This command has been removed. Please use \"debug transaction view\" instead.")
]

-- Backwards compatible parsers
Expand Down
15 changes: 0 additions & 15 deletions cardano-cli/src/Cardano/CLI/EraBased/Run/Transaction.hs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ module Cardano.CLI.EraBased.Run.Transaction
, runTransactionPolicyIdCmd
, runTransactionHashScriptDataCmd
, runTransactionTxIdCmd
, runTransactionViewCmd
, runTransactionWitnessCmd
, runTransactionSignWitnessCmd
, toTxOutByronEra
Expand Down Expand Up @@ -79,7 +78,6 @@ import qualified Data.Text.IO as Text
import Data.Type.Equality (TestEquality (..))
import GHC.Exts (IsList (..))
import Lens.Micro ((^.))
import qualified System.Exit as IO
import qualified System.IO as IO

runTransactionCmds :: Cmd.TransactionCmds era -> ExceptT TxCmdError IO ()
Expand All @@ -93,7 +91,6 @@ runTransactionCmds = \case
Cmd.TransactionCalculateMinValueCmd args -> runTransactionCalculateMinValueCmd args
Cmd.TransactionHashScriptDataCmd args -> runTransactionHashScriptDataCmd args
Cmd.TransactionTxIdCmd args -> runTransactionTxIdCmd args
Cmd.TransactionViewCmd args -> runTransactionViewCmd args
Cmd.TransactionPolicyIdCmd args -> runTransactionPolicyIdCmd args
Cmd.TransactionWitnessCmd args -> runTransactionWitnessCmd args
Cmd.TransactionSignWitnessCmd args -> runTransactionSignWitnessCmd args
Expand Down Expand Up @@ -1698,18 +1695,6 @@ runTransactionTxIdCmd

liftIO $ BS.putStrLn $ serialiseToRawBytesHex (getTxId txbody)

runTransactionViewCmd
:: ()
=> Cmd.TransactionViewCmdArgs
-> ExceptT TxCmdError IO ()
runTransactionViewCmd
Cmd.TransactionViewCmdArgs =
liftIO $ do
IO.hPutStrLn
IO.stderr
"Command \"era transaction view\" has been removed. Please use \"debug transaction view\" instead."
IO.exitWith (IO.ExitFailure 1)

-- ----------------------------------------------------------------------------
-- Witness commands
--
Expand Down
2 changes: 0 additions & 2 deletions cardano-cli/src/Cardano/CLI/Legacy/Commands/Transaction.hs
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,6 @@ data LegacyTransactionCmds
ScriptDataOrFile
| TransactionTxIdCmd
InputTxBodyOrTxFile
| TransactionViewCmd

renderLegacyTransactionCmds :: LegacyTransactionCmds -> Text
renderLegacyTransactionCmds = \case
Expand All @@ -149,4 +148,3 @@ renderLegacyTransactionCmds = \case
TransactionCalculateMinValueCmd{} -> "transaction calculate-min-value"
TransactionHashScriptDataCmd{} -> "transaction hash-script-data"
TransactionTxIdCmd{} -> "transaction txid"
TransactionViewCmd{} -> "transaction view"
7 changes: 0 additions & 7 deletions cardano-cli/src/Cardano/CLI/Legacy/Options.hs
Original file line number Diff line number Diff line change
Expand Up @@ -298,9 +298,6 @@ pTransaction envCli =
, subParser
"txid"
(Opt.info pTransactionId $ Opt.progDesc "Print a transaction identifier.")
, subParser "view" $
Opt.info pTransactionView $
Opt.progDesc "This command has been removed. Please use \"debug transaction view\" instead."
]
where
-- Backwards compatible parsers
Expand Down Expand Up @@ -486,10 +483,6 @@ pTransaction envCli =
TransactionTxIdCmd
<$> pInputTxOrTxBodyFile

pTransactionView :: Parser LegacyTransactionCmds
pTransactionView =
pure TransactionViewCmd

pNodeCmds :: Parser LegacyNodeCmds
pNodeCmds =
asum
Expand Down
7 changes: 0 additions & 7 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,6 @@ runLegacyTransactionCmds = \case
runLegacyTransactionHashScriptDataCmd scriptDataOrFile
TransactionTxIdCmd txinfile ->
runLegacyTransactionTxIdCmd txinfile
TransactionViewCmd ->
runLegacyTransactionViewCmd
TransactionPolicyIdCmd sFile ->
runLegacyTransactionPolicyIdCmd sFile
TransactionWitnessCmd txBodyfile witSignData mbNw outFile ->
Expand Down Expand Up @@ -508,11 +506,6 @@ runLegacyTransactionTxIdCmd txfile =
txfile
)

runLegacyTransactionViewCmd :: ExceptT TxCmdError IO ()
runLegacyTransactionViewCmd =
runTransactionViewCmd
Cmd.TransactionViewCmdArgs

runLegacyTransactionWitnessCmd
:: ()
=> TxBodyFile In
Expand Down

0 comments on commit 44956a8

Please sign in to comment.