Skip to content

Commit

Permalink
query protocol parameters: use ledger instances
Browse files Browse the repository at this point in the history
  • Loading branch information
smelc committed Nov 14, 2023
1 parent 7082071 commit 450a0a6
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions cardano-cli/src/Cardano/CLI/EraBased/Run/Query.hs
Original file line number Diff line number Diff line change
Expand Up @@ -184,14 +184,13 @@ runQueryProtocolParametersCmd
. newExceptT $ executeQueryAnyMode localNodeConnInfo qInMode
writeProtocolParameters sbe mOutFile pp
where
-- TODO: Conway era - use ledger PParams JSON
writeProtocolParameters
:: ShelleyBasedEra era
-> Maybe (File () Out)
-> Ledger.PParams (ShelleyLedgerEra era)
-> ExceptT QueryCmdError IO ()
writeProtocolParameters sbe mOutFile' pparams =
let apiPParamsJSON = (encodePretty $ fromLedgerPParams sbe pparams)
let apiPParamsJSON = shelleyBasedEraConstraints sbe $ encodePretty pparams
in case mOutFile' of
Nothing -> liftIO $ LBS.putStrLn apiPParamsJSON
Just (File fpath) ->
Expand Down

0 comments on commit 450a0a6

Please sign in to comment.