diff --git a/cardano-cli/src/Cardano/CLI/Shelley/Run/Transaction.hs b/cardano-cli/src/Cardano/CLI/Shelley/Run/Transaction.hs index 7bd8312582..81932f0ee8 100644 --- a/cardano-cli/src/Cardano/CLI/Shelley/Run/Transaction.hs +++ b/cardano-cli/src/Cardano/CLI/Shelley/Run/Transaction.hs @@ -351,10 +351,6 @@ runTxBuildCmd , localNodeSocketPath = socketPath } - AnyCardanoEra nodeEra <- lift (executeLocalStateQueryExpr localNodeConnInfo Nothing (determineEraExpr cModeParams)) - & onLeft (left . ShelleyTxCmdQueryConvenienceError . AcqFailure) - & onLeft (left . ShelleyTxCmdQueryConvenienceError . QceUnsupportedNtcVersion) - inputsAndMaybeScriptWits <- firstExceptT ShelleyTxCmdScriptWitnessError $ readScriptWitnessFiles cEra txins certFilesAndMaybeScriptWits <- firstExceptT ShelleyTxCmdScriptWitnessError $ readScriptWitnessFiles cEra certs @@ -430,6 +426,10 @@ runTxBuildCmd case consensusMode of CardanoMode -> do + AnyCardanoEra nodeEra <- lift (executeLocalStateQueryExpr localNodeConnInfo Nothing (determineEraExpr cModeParams)) + & onLeft (left . ShelleyTxCmdQueryConvenienceError . AcqFailure) + & onLeft (left . ShelleyTxCmdQueryConvenienceError . QceUnsupportedNtcVersion) + (nodeEraUTxO, _, eraHistory, systemStart, _, _) <- lift (executeLocalStateQueryExpr localNodeConnInfo Nothing (queryStateForBalancedTx nodeEra allTxInputs [])) & onLeft (left . ShelleyTxCmdQueryConvenienceError . AcqFailure)