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

Commit 37f8e84

Browse files
committed
Merge pull request #3686 [remove wallet dep from plugin] into CO-372/TheGreatCleanup
2 parents 633a4de + bdd39b7 commit 37f8e84

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)
@@ -57,14 +61,9 @@ import Pos.Util.Wlog (logInfo, modifyLoggerName, usingLoggerName)
5761
import Pos.Web (serveDocImpl, serveImpl)
5862
import qualified Pos.Web.Server
5963

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

67-
6867
-- | A @Plugin@ to start the wallet REST server
6968
apiServer
7069
:: NewWalletBackendParams
@@ -180,3 +179,6 @@ updateWatcher = const $ do
180179
newUpdate <- WalletLayer.waitForUpdate w
181180
logInfo "A new update was found!"
182181
WalletLayer.addUpdate w . cpsSoftwareVersion $ newUpdate
182+
183+
instance Buildable Servant.NoContent where
184+
build Servant.NoContent = build ()

0 commit comments

Comments
 (0)