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 Oct 11, 2018
2 parents 154b9ac + 353b6de commit 2ae4372
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 @@ -58,14 +62,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
:: ProtocolMagic
Expand Down Expand Up @@ -182,3 +181,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 2ae4372

Please sign in to comment.