Skip to content

Commit

Permalink
Update cardano-submit-api with SocketPath from cardano-api
Browse files Browse the repository at this point in the history
  • Loading branch information
Jimbo4350 committed Sep 20, 2022
1 parent 903b1d9 commit 5efb1e3
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 14 deletions.
5 changes: 2 additions & 3 deletions cardano-submit-api/src/Cardano/TxSubmit/CLI/Parsers.hs
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,8 @@ module Cardano.TxSubmit.CLI.Parsers
) where

import Cardano.Api (AnyConsensusModeParams (..), ConsensusModeParams (..),
EpochSlots (..), NetworkId (..), NetworkMagic (..))
import Cardano.TxSubmit.CLI.Types (ConfigFile (..), SocketPath (..),
TxSubmitNodeParams (..))
EpochSlots (..), NetworkId (..), NetworkMagic (..), SocketPath (..))
import Cardano.TxSubmit.CLI.Types (ConfigFile (..), TxSubmitNodeParams (..))
import Cardano.TxSubmit.Rest.Parsers (pWebserverConfig)
import Control.Applicative (Alternative (..), Applicative (..), (<**>))
import Data.Function ((.))
Expand Down
3 changes: 1 addition & 2 deletions cardano-submit-api/src/Cardano/TxSubmit/CLI/Types.hs
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
module Cardano.TxSubmit.CLI.Types
( ConfigFile (..)
, GenesisFile (..)
, SocketPath (..)
, TxSubmitNodeParams (..)
) where

import Cardano.Api (AnyConsensusModeParams, NetworkId (..))
import Cardano.Api (AnyConsensusModeParams, NetworkId (..), SocketPath)
import Cardano.TxSubmit.Rest.Types (WebserverConfig)
import Data.Int
import System.IO (FilePath)
Expand Down
2 changes: 0 additions & 2 deletions cardano-submit-api/src/Cardano/TxSubmit/ErrorRender.hs
Original file line number Diff line number Diff line change
Expand Up @@ -74,5 +74,3 @@ renderEraMismatch EraMismatch{ledgerEraName, otherEraName} =
"The node is running in the " <> ledgerEraName <>
" era, but the transaction is for the " <> otherEraName <> " era."

textShow :: Show a => a -> Text
textShow = T.pack . show
1 change: 0 additions & 1 deletion cardano-submit-api/src/Cardano/TxSubmit/Types.hs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ module Cardano.TxSubmit.Types

import Cardano.Api (AnyCardanoEra, AnyConsensusMode (..), Error (..), TxId)
import Cardano.Binary (DecoderError)
import Cardano.TxSubmit.Util (textShow)
import Data.Aeson (ToJSON (..), Value (..))
import Data.ByteString.Char8 (ByteString)
import Data.Either (Either (Right))
Expand Down
9 changes: 3 additions & 6 deletions cardano-submit-api/src/Cardano/TxSubmit/Util.hs
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,12 @@ module Cardano.TxSubmit.Util
( logException
) where

import Cardano.Api (textShow)
import Prelude

import Cardano.BM.Trace (Trace, logError)
import Control.Exception (SomeException, catch, throwIO)
import Data.Function (($), (.))
import Data.Semigroup (Semigroup ((<>)))
import Data.Text (Text)
import System.IO (IO)
import Text.Show (Show (..))

import qualified Data.Text as T

-- | ouroboros-network catches 'SomeException' and if a 'nullTracer' is passed into that
-- code, the caught exception will not be logged. Therefore wrap all tx submission code that
Expand Down

0 comments on commit 5efb1e3

Please sign in to comment.