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

Commit fed0a18

Browse files
committed
Merge pull request #3686 [remove wallet dep from plugin] into CO-372/TheGreatCleanup
2 parents 557d942 + f7a66c2 commit fed0a18

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

wallet-new/src/Cardano/Wallet/Server/Plugins.hs

+7-5
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@
33
a particular monad, at some point in time.
44
-}
55

6+
-- Orphan instance for Buildable Servant.NoContent
7+
{-# OPTIONS_GHC -fno-warn-orphans #-}
8+
69
module Cardano.Wallet.Server.Plugins
710
( Plugin
811
, apiServer
@@ -19,6 +22,7 @@ import Data.Aeson (encode)
1922
import qualified Data.ByteString.Char8 as BS8
2023
import qualified Data.Text as T
2124
import Data.Typeable (typeOf)
25+
import Formatting.Buildable (build)
2226
import qualified Servant
2327

2428
import Network.HTTP.Types.Status (badRequest400)
@@ -58,14 +62,9 @@ import Pos.Util.Wlog (logInfo, modifyLoggerName, usingLoggerName)
5862
import Pos.Web (serveDocImpl, serveImpl)
5963
import qualified Pos.Web.Server
6064

61-
-- Needed for Orphan Instance 'Buildable Servant.NoContent' :|
62-
import Pos.Wallet.Web ()
63-
64-
6565
-- A @Plugin@ running in the monad @m@.
6666
type Plugin m = Diffusion m -> m ()
6767

68-
6968
-- | A @Plugin@ to start the wallet REST server
7069
apiServer
7170
:: ProtocolMagic
@@ -182,3 +181,6 @@ updateWatcher = const $ do
182181
newUpdate <- WalletLayer.waitForUpdate w
183182
logInfo "A new update was found!"
184183
WalletLayer.addUpdate w . cpsSoftwareVersion $ newUpdate
184+
185+
instance Buildable Servant.NoContent where
186+
build Servant.NoContent = build ()

0 commit comments

Comments
 (0)