From ff159080aa6103a2bd02a27b05149e197735fd9d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Hurlin?= Date: Mon, 6 Jan 2025 11:00:08 +0100 Subject: [PATCH] Remove orphan instance (thanks mateusz for the trick) --- cardano-cli/src/Cardano/CLI/EraBased/Run/Transaction.hs | 2 +- cardano-cli/src/Cardano/CLI/Orphans.hs | 7 ------- 2 files changed, 1 insertion(+), 8 deletions(-) diff --git a/cardano-cli/src/Cardano/CLI/EraBased/Run/Transaction.hs b/cardano-cli/src/Cardano/CLI/EraBased/Run/Transaction.hs index 4e9010e016..b19c5f25b6 100644 --- a/cardano-cli/src/Cardano/CLI/EraBased/Run/Transaction.hs +++ b/cardano-cli/src/Cardano/CLI/EraBased/Run/Transaction.hs @@ -397,7 +397,7 @@ runTransactionBuildEstimateCmd -- TODO change type , txBodyOutFile } = do let sbe = convert currentEra - meo = convert currentEra + meo = convert (convert currentEra :: BabbageEraOnwards era) ledgerPParams <- firstExceptT TxCmdProtocolParamsError $ readProtocolParameters sbe protocolParamsFile diff --git a/cardano-cli/src/Cardano/CLI/Orphans.hs b/cardano-cli/src/Cardano/CLI/Orphans.hs index 3f831a55af..5d7a5b42da 100644 --- a/cardano-cli/src/Cardano/CLI/Orphans.hs +++ b/cardano-cli/src/Cardano/CLI/Orphans.hs @@ -9,7 +9,6 @@ module Cardano.CLI.Orphans where import Cardano.Api -import qualified Cardano.Api.Experimental as Exp import qualified Cardano.Api.Ledger as L import Cardano.Api.Shelley (scriptDataToJsonDetailedSchema) @@ -33,9 +32,3 @@ instance ToJSON HashableScriptData where [ "hash" .= hashScriptDataBytes hsd , "json" .= scriptDataToJsonDetailedSchema hsd ] - --- TODO Delete me when added in API -instance Convert Exp.Era MaryEraOnwards where - convert = \case - Exp.BabbageEra -> MaryEraOnwardsBabbage - Exp.ConwayEra -> MaryEraOnwardsConway