Skip to content

Commit

Permalink
Delete Cardano.CLI.Mary.RenderValue
Browse files Browse the repository at this point in the history
Replaced by functions moved into the API

Co-authored-by: Jordan Millar <jordan.millar@iohk.io>
  • Loading branch information
dcoutts and Jimbo4350 committed Jul 27, 2021
1 parent 3d5dab8 commit 8bbb805
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 116 deletions.
1 change: 0 additions & 1 deletion cardano-cli/cardano-cli.cabal
Expand Up @@ -89,7 +89,6 @@ library
Cardano.CLI.Shelley.Run.Transaction
Cardano.CLI.Shelley.Script

Cardano.CLI.Mary.RenderValue
Cardano.CLI.Mary.ValueParser

Cardano.CLI.TopHandler
Expand Down
109 changes: 0 additions & 109 deletions cardano-cli/src/Cardano/CLI/Mary/RenderValue.hs

This file was deleted.

2 changes: 1 addition & 1 deletion cardano-cli/src/Cardano/CLI/Shelley/Run/Query.hs
Expand Up @@ -709,7 +709,7 @@ printUtxo shelleyBasedEra' txInOutTuple =
in Text.pack $ replicate (max 1 (len - slen)) ' ' ++ str

printableValue :: TxOutValue era -> Text
printableValue (TxOutValue _ val) = renderValue defaultRenderValueOptions val
printableValue (TxOutValue _ val) = renderValue val
printableValue (TxOutAdaOnly _ (Lovelace i)) = Text.pack $ show i


Expand Down
8 changes: 3 additions & 5 deletions cardano-cli/test/Test/Cli/MultiAssetParsing.hs
Expand Up @@ -11,9 +11,7 @@ import qualified Text.Parsec as Parsec (parse)
import Hedgehog (Property, checkSequential, discover, forAll, property, tripping)
import Hedgehog.Gen (filter)

import Cardano.Api (valueToList)
import Cardano.CLI.Mary.RenderValue (defaultRenderPrettyValueOptions,
defaultRenderValueOptions, renderPrettyValue, renderValue)
import Cardano.Api (valueToList, renderValue, renderValuePretty)
import Cardano.CLI.Mary.ValueParser (parseValue)

import Gen.Cardano.Api.Typed (genValueDefault)
Expand All @@ -24,7 +22,7 @@ prop_roundtrip_Value_parse_render =
value <- forAll $ filter (not . null . valueToList) genValueDefault
tripping
value
(renderValue defaultRenderValueOptions)
renderValue
(Parsec.parse parseValue "" . Text.unpack)

prop_roundtrip_Value_parse_renderPretty :: Property
Expand All @@ -33,7 +31,7 @@ prop_roundtrip_Value_parse_renderPretty =
value <- forAll $ filter (not . null . valueToList) genValueDefault
tripping
value
(renderPrettyValue defaultRenderPrettyValueOptions)
renderValuePretty
(Parsec.parse parseValue "" . Text.unpack)

-- -----------------------------------------------------------------------------
Expand Down

0 comments on commit 8bbb805

Please sign in to comment.