Skip to content

Commit

Permalink
apply stylistic suggestions
Browse files Browse the repository at this point in the history
  • Loading branch information
paolino committed May 10, 2022
1 parent 15a841e commit c1e8181
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion lib/cli/src/Cardano/CLI.hs
Original file line number Diff line number Diff line change
Expand Up @@ -730,7 +730,7 @@ cmdWalletGetUtxoStatistics mkClient =
data TransactionFeatures = NoShelleyFeatures | ShelleyFeatures
deriving (Show, Eq)

-- | which json schema to use for output, True is simple
-- | Which json schema to use for output
metadataSchemaOption :: Parser TxMetadataSchema
metadataSchemaOption = flag TxMetadataDetailedSchema TxMetadataNoSchema
$ long "simple-metadata"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -494,12 +494,12 @@ spec = describe "SHELLEY_CLI_TRANSACTIONS" $ do
wallet <- emptyWallet ctx
(Exit code, Stdout out, Stderr err) <-
listTransactionsViaCLI ctx TxMetadataDetailedSchema $
join
[ [T.unpack $ wallet ^. walletId]
, maybe [] (\t -> ["--start", t]) mStart
, maybe [] (\t -> ["--end" , t]) mEnd
, maybe [] (\o -> ["--order", showT o]) mOrder
]
join
[ [T.unpack $ wallet ^. walletId]
, maybe [] (\t -> ["--start", t]) mStart
, maybe [] (\t -> ["--end" , t]) mEnd
, maybe [] (\o -> ["--order", showT o]) mOrder
]
err `shouldBe` "Ok.\n"
out `shouldBe` "[]\n"
code `shouldBe` ExitSuccess
Expand Down
2 changes: 1 addition & 1 deletion lib/core/src/Cardano/Wallet/Api/Client.hs
Original file line number Diff line number Diff line change
Expand Up @@ -339,7 +339,7 @@ transactionClient =
, deleteTransaction = _deleteTransaction
, getTransaction =
\wid txid metadataSchema ->
_getTransaction wid txid (toSimpleMetadataFlag metadataSchema)
_getTransaction wid txid (toSimpleMetadataFlag metadataSchema)
, constructTransaction = _constructTransaction
, balanceTransaction = _balanceTransaction
, decodeTransaction = _decodeTransaction
Expand Down
8 changes: 4 additions & 4 deletions lib/core/src/Cardano/Wallet/Api/Types/SchemaMetadata.hs
Original file line number Diff line number Diff line change
Expand Up @@ -34,15 +34,15 @@ import GHC.Generics
( Generic )
import Prelude

-- | a tag to select the json codec
-- | A tag to select the json codec
data TxMetadataSchema = TxMetadataNoSchema | TxMetadataDetailedSchema
deriving (Show, Eq, Generic, NFData)

-- | a wrapper to drive the json codec of metadata
-- | A wrapper to drive the json codec of metadata
data TxMetadataWithSchema = TxMetadataWithSchema
{ -- | how to codec the metadata into json
{ -- | How to codec the metadata into json
txMetadataWithSchema_schema :: TxMetadataSchema
, -- | the metadata
, -- | The metadata
txMetadataWithSchema_metadata :: TxMetadata
}
deriving (Show, Eq, Generic, NFData)
Expand Down

0 comments on commit c1e8181

Please sign in to comment.