Skip to content
This repository has been archived by the owner on Aug 18, 2020. It is now read-only.

[CBR-227] Remove legacy wallet layer #3395

Merged
merged 1 commit into from
Aug 14, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 3 additions & 5 deletions wallet-new/cardano-sl-wallet-new.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,6 @@ library
Cardano.Wallet.Util

Cardano.Wallet.WalletLayer
Cardano.Wallet.WalletLayer.Types
Cardano.Wallet.WalletLayer.ExecutionTimeLimit
-- * Useful for testing, especially in the fixture side.
Cardano.Wallet.WalletLayer.Kernel.Accounts
Expand All @@ -133,11 +132,10 @@ library
Cardano.Wallet.WalletLayer.Kernel.Conv
Cardano.Wallet.WalletLayer.Kernel.Transactions
Cardano.Wallet.WalletLayer.Kernel.Wallets

other-modules: Cardano.Wallet.WalletLayer.Kernel
Cardano.Wallet.WalletLayer.Legacy
Cardano.Wallet.WalletLayer.Kernel
Cardano.Wallet.WalletLayer.Error
Paths_cardano_sl_wallet_new

other-modules: Paths_cardano_sl_wallet_new
ghc-options: -Wall

build-depends: base
Expand Down
6 changes: 3 additions & 3 deletions wallet-new/server/Main.hs
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@ import Cardano.Wallet.Server.CLI (ChooseWalletBackend (..),
WalletStartupOptions (..), getWalletNodeOptions,
walletDbPath, walletFlushDb, walletRebuildDb)
import qualified Cardano.Wallet.Server.Plugins as Plugins
import Cardano.Wallet.WalletLayer (PassiveWalletLayer,
bracketKernelPassiveWallet)
import Cardano.Wallet.WalletLayer (PassiveWalletLayer)
import qualified Cardano.Wallet.WalletLayer.Kernel as WalletLayer.Kernel

-- | Default logger name when one is not provided on the command line
defaultLoggerName :: LoggerName
Expand Down Expand Up @@ -134,7 +134,7 @@ actionWithNewWallet pm txpConfig sscParams nodeParams params =
userSecret <- readTVarIO (ncUserSecret $ nrContext nr)
let nodeState = NodeStateAdaptor.newNodeStateAdaptor nr
liftIO $ Keystore.bracketLegacyKeystore userSecret $ \keystore -> do
bracketKernelPassiveWallet logMessage' keystore nodeState $ \walletLayer passiveWallet -> do
WalletLayer.Kernel.bracketPassiveWallet logMessage' keystore nodeState $ \walletLayer passiveWallet -> do
Kernel.init passiveWallet
Kernel.Mode.runWalletMode pm
txpConfig
Expand Down
4 changes: 2 additions & 2 deletions wallet-new/src/Cardano/Wallet/API/V1/Handlers.hs
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ import qualified Cardano.Wallet.API.V1.Handlers.Addresses as Addresses
import qualified Cardano.Wallet.API.V1.Handlers.Transactions as Transactions
import qualified Cardano.Wallet.API.V1.Handlers.Wallets as Wallets

import Cardano.Wallet.WalletLayer (ActiveWalletLayer)
import Cardano.Wallet.WalletLayer.Types (walletPassiveLayer)
import Cardano.Wallet.WalletLayer (ActiveWalletLayer,
walletPassiveLayer)


handlers :: ActiveWalletLayer IO -> Server V1.API
Expand Down
4 changes: 2 additions & 2 deletions wallet-new/src/Cardano/Wallet/API/V1/Handlers/Accounts.hs
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ import Cardano.Wallet.API.Response
import qualified Cardano.Wallet.API.V1.Accounts as Accounts
import Cardano.Wallet.API.V1.Types
import qualified Cardano.Wallet.Kernel.DB.Util.IxSet as KernelIxSet
import Cardano.Wallet.WalletLayer.Types (PassiveWalletLayer)
import qualified Cardano.Wallet.WalletLayer.Types as WalletLayer
import Cardano.Wallet.WalletLayer (PassiveWalletLayer)
import qualified Cardano.Wallet.WalletLayer as WalletLayer

handlers :: PassiveWalletLayer IO -> ServerT Accounts.API Handler
handlers w = deleteAccount w
Expand Down
4 changes: 2 additions & 2 deletions wallet-new/src/Cardano/Wallet/API/V1/Handlers/Addresses.hs
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import Universum

import Servant

import Cardano.Wallet.WalletLayer.Types (PassiveWalletLayer)
import qualified Cardano.Wallet.WalletLayer.Types as WalletLayer
import Cardano.Wallet.WalletLayer (PassiveWalletLayer)
import qualified Cardano.Wallet.WalletLayer as WalletLayer

import Cardano.Wallet.API.Request
import Cardano.Wallet.API.Response
Expand Down
4 changes: 2 additions & 2 deletions wallet-new/src/Cardano/Wallet/API/V1/Handlers/Transactions.hs
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@ import Cardano.Wallet.Kernel.CoinSelection.FromGeneric
(ExpenseRegulation (..), InputGrouping (..))
import Cardano.Wallet.Kernel.Util.Core (getCurrentTimestamp,
paymentAmount)
import qualified Cardano.Wallet.WalletLayer as WalletLayer
import Cardano.Wallet.WalletLayer.Types (ActiveWalletLayer,
import Cardano.Wallet.WalletLayer (ActiveWalletLayer,
PassiveWalletLayer)
import qualified Cardano.Wallet.WalletLayer as WalletLayer

handlers :: ActiveWalletLayer IO -> ServerT Transactions.API Handler
handlers aw = newTransaction aw
Expand Down
2 changes: 1 addition & 1 deletion wallet-new/src/Cardano/Wallet/API/V1/Handlers/Wallets.hs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import Cardano.Wallet.API.V1.Types as V1
import qualified Cardano.Wallet.API.V1.Wallets as Wallets

import Cardano.Wallet.WalletLayer (PassiveWalletLayer (..))
import qualified Cardano.Wallet.WalletLayer.Types as WalletLayer
import qualified Cardano.Wallet.WalletLayer as WalletLayer

import qualified Cardano.Wallet.Kernel.DB.Util.IxSet as KernelIxSet
import qualified Data.IxSet.Typed as IxSet
Expand Down
5 changes: 3 additions & 2 deletions wallet-new/src/Cardano/Wallet/Server/Plugins.hs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@ import Cardano.Wallet.Server.CLI (NewWalletBackendParams (..),
RunMode, WalletBackendParams (..), isDebugMode,
walletAcidInterval, walletDbOptions)
import Cardano.Wallet.WalletLayer (ActiveWalletLayer,
PassiveWalletLayer, bracketKernelActiveWallet)
PassiveWalletLayer)
import qualified Cardano.Wallet.WalletLayer.Kernel as WalletLayer.Kernel
import qualified Pos.Wallet.Web.Error.Types as V0

import Control.Exception (fromException)
Expand Down Expand Up @@ -203,7 +204,7 @@ walletBackend protocolMagic (NewWalletBackendParams WalletBackendParams{..}) (pa
pure $ \diffusion -> do
env <- ask
let diffusion' = Kernel.fromDiffusion (lower env) diffusion
bracketKernelActiveWallet protocolMagic passiveLayer passiveWallet diffusion' $ \active _ -> do
WalletLayer.Kernel.bracketActiveWallet protocolMagic passiveLayer passiveWallet diffusion' $ \active _ -> do
ctx <- view shutdownContext
let
portCallback :: Word16 -> IO ()
Expand Down
Loading