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

Commit

Permalink
Merge pull request #3686 [remove wallet dep from plugin] into CO-372/…
Browse files Browse the repository at this point in the history
…TheGreatCleanup
  • Loading branch information
KtorZ committed Nov 2, 2018
2 parents 633a4de + bdd39b7 commit 37f8e84
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions wallet-new/src/Cardano/Wallet/Server/Plugins.hs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
a particular monad, at some point in time.
-}

-- Orphan instance for Buildable Servant.NoContent
{-# OPTIONS_GHC -fno-warn-orphans #-}

module Cardano.Wallet.Server.Plugins
( Plugin
, apiServer
Expand All @@ -19,6 +22,7 @@ import Data.Aeson (encode)
import qualified Data.ByteString.Char8 as BS8
import qualified Data.Text as T
import Data.Typeable (typeOf)
import Formatting.Buildable (build)
import qualified Servant

import Network.HTTP.Types.Status (badRequest400)
Expand Down Expand Up @@ -57,14 +61,9 @@ import Pos.Util.Wlog (logInfo, modifyLoggerName, usingLoggerName)
import Pos.Web (serveDocImpl, serveImpl)
import qualified Pos.Web.Server

-- Needed for Orphan Instance 'Buildable Servant.NoContent' :|
import Pos.Wallet.Web ()


-- A @Plugin@ running in the monad @m@.
type Plugin m = Diffusion m -> m ()


-- | A @Plugin@ to start the wallet REST server
apiServer
:: NewWalletBackendParams
Expand Down Expand Up @@ -180,3 +179,6 @@ updateWatcher = const $ do
newUpdate <- WalletLayer.waitForUpdate w
logInfo "A new update was found!"
WalletLayer.addUpdate w . cpsSoftwareVersion $ newUpdate

instance Buildable Servant.NoContent where
build Servant.NoContent = build ()

0 comments on commit 37f8e84

Please sign in to comment.