Skip to content
This repository was archived by the owner on Mar 1, 2019. It is now read-only.

Commit 2a736e8

Browse files
author
Michael Hueschen
committed
[CDEC-432] Switch JsonLog & Mockable imports
Change imports from `networking` to `core` (modules now have a `Pos.Core.` prefix. A few dependencies on `networking` disappear or switch to deps on `core`.
1 parent 50839f9 commit 2a736e8

File tree

9 files changed

+10
-10
lines changed

9 files changed

+10
-10
lines changed

server/Main.hs

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,11 @@ import Universum
1010

1111
import Control.Concurrent.STM (newTQueueIO)
1212
import Data.Maybe (fromJust)
13-
import Mockable (Production (..), runProduction)
1413
import Ntp.Client (NtpStatus, withNtpClient)
1514
import qualified Pos.Client.CLI as CLI
1615
import Pos.Context (ncUserSecret)
1716
import Pos.Core (epochSlots)
17+
import Pos.Core.Mockable (Production (..), runProduction)
1818
import Pos.Crypto (ProtocolMagic)
1919
import Pos.DB.DB (initNodeDBs)
2020
import Pos.Infra.Diffusion.Types (Diffusion)

src/Cardano/Wallet/API/V1/Handlers.hs

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import qualified Cardano.Wallet.API.V1.Handlers.Addresses as Addresses
88
import qualified Cardano.Wallet.API.V1.Handlers.Transactions as Transactions
99
import Cardano.Wallet.WalletLayer (ActiveWalletLayer)
1010
import Cardano.Wallet.WalletLayer.Types
11-
import Mockable
11+
import Pos.Core.Mockable
1212

1313
handlers :: ActiveWalletLayer Production -> Server V1.API
1414
handlers w = Addresses.handlers w

src/Cardano/Wallet/API/V1/Handlers/Addresses.hs

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@ import Universum
77

88
import Servant
99

10-
import Mockable.Production (Production, runProduction)
11-
1210
import Cardano.Wallet.WalletLayer.Types (ActiveWalletLayer,
1311
PassiveWalletLayer (..), walletPassiveLayer)
1412

@@ -17,6 +15,8 @@ import Cardano.Wallet.API.Response
1715
import qualified Cardano.Wallet.API.V1.Addresses as Addresses
1816
import Cardano.Wallet.API.V1.Types
1917

18+
import Pos.Core.Mockable.Production (Production, runProduction)
19+
2020
handlers :: ActiveWalletLayer Production -> ServerT Addresses.API Handler
2121
handlers w = listAddresses
2222
:<|> newAddress (walletPassiveLayer w)

src/Cardano/Wallet/API/V1/Handlers/Transactions.hs

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ import Universum
1313
import Servant
1414

1515
import Data.Coerce (coerce)
16-
import Mockable.Production (Production, runProduction)
1716

1817
import Cardano.Wallet.Kernel.CoinSelection.FromGeneric
1918
(ExpenseRegulation (..), InputGrouping (..))
@@ -24,6 +23,7 @@ import Cardano.Wallet.WalletLayer.Types (ActiveWalletLayer)
2423
import Pos.Client.Txp.Util (InputSelectionPolicy (..),
2524
defaultInputSelectionPolicy)
2625
import Pos.Core (Address, Tx (..), TxOut (..))
26+
import Pos.Core.Mockable.Production (Production, runProduction)
2727
import Pos.Crypto (hash)
2828

2929
import Cardano.Wallet.API.Request

src/Cardano/Wallet/API/V1/LegacyHandlers/Info.hs

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ import qualified Cardano.Wallet.API.V1.Info as Info
99
import Cardano.Wallet.API.V1.Migration
1010
import Cardano.Wallet.API.V1.Types as V1
1111

12-
import Mockable (MonadMockable)
1312
import Ntp.Client (NtpStatus)
13+
import Pos.Core.Mockable (MonadMockable)
1414
import Pos.Infra.Diffusion.Subscription.Status (ssMap)
1515
import Pos.Infra.Diffusion.Types (Diffusion (..))
1616
import Pos.Wallet.WalletMode (MonadBlockchainInfo)

src/Cardano/Wallet/API/V1/Migration/Monads.hs

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@ module Cardano.Wallet.API.V1.Migration.Monads (
1111
import Universum
1212

1313
import qualified Control.Monad.Catch as Catch
14-
import Mockable (runProduction)
1514
import Servant
1615

16+
import Pos.Core.Mockable (runProduction)
1717
import Pos.Wallet.Web.Mode (WalletWebMode, WalletWebModeContext)
1818

1919
-- | Temporary monad to handle the migration from the V0 & V1 stacks.

src/Cardano/Wallet/Kernel/Mode.hs

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,14 @@ module Cardano.Wallet.Kernel.Mode
1111
import Control.Lens (makeLensesWith)
1212
import Universum
1313

14-
import Mockable
1514
import Pos.Block.BListener
1615
import Pos.Block.Slog
1716
import Pos.Block.Types
1817
import Pos.Context
1918
import Pos.Core
2019
import Pos.Core.Chrono
2120
import Pos.Core.JsonLog (CanJsonLog (..))
21+
import Pos.Core.Mockable
2222
import Pos.Core.Reporting (HasMisbehaviorMetrics (..))
2323
import Pos.DB
2424
import Pos.DB.Block

src/Cardano/Wallet/Server.hs

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ import Cardano.Wallet.API.V1.Swagger (swaggerSchemaUIServer)
1515
import qualified Cardano.Wallet.API.V1.Swagger as Swagger
1616
import Cardano.Wallet.Server.CLI (RunMode (..))
1717
import Cardano.Wallet.WalletLayer (ActiveWalletLayer)
18-
import Mockable
18+
import Pos.Core.Mockable
1919
import Pos.Update.Configuration (HasUpdateConfiguration,
2020
curSoftwareVersion)
2121
import Pos.Util.CompileInfo (HasCompileInfo, compileInfo)

src/Cardano/Wallet/Server/Plugins.hs

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@ import qualified Pos.Wallet.Web.Error.Types as V0
3636
import Control.Exception (fromException)
3737
import Data.Aeson
3838
import Formatting (build, sformat, (%))
39-
import Mockable
4039
import Network.HTTP.Types.Status (badRequest400)
4140
import Network.Wai (Application, Middleware, Response, responseLBS)
4241
import Network.Wai.Handler.Warp (defaultSettings,
@@ -45,6 +44,7 @@ import Network.Wai.Middleware.Cors (cors, corsMethods,
4544
corsRequestHeaders, simpleCorsResourcePolicy,
4645
simpleMethods)
4746
import Ntp.Client (NtpStatus)
47+
import Pos.Core.Mockable
4848
import Pos.Infra.Diffusion.Types (Diffusion (..))
4949
import Pos.Wallet.Web (cleanupAcidStatePeriodically)
5050
import Pos.Wallet.Web.Pending.Worker (startPendingTxsResubmitter)

0 commit comments

Comments
 (0)