Skip to content

Commit

Permalink
style
Browse files Browse the repository at this point in the history
  • Loading branch information
Anviking committed May 23, 2019
1 parent 6c443b3 commit 03883a5
Showing 1 changed file with 1 addition and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ api :: Proxy Api
api = Proxy

type Api =
(GetBlocks :<|> GetTipId :<|> GetBlockDecendantIds :<|> PostSignedTx)
GetBlocks :<|> GetTipId :<|> GetBlockDecendantIds :<|> PostSignedTx


-- | Retrieve a block by its id. Optionally include a given number of
Expand Down Expand Up @@ -104,19 +104,15 @@ newtype BlockId = BlockId (Hash "block")

newtype ApiT a = ApiT { getApiT :: a } deriving (Show)


instance ToHttpApiData BlockId where
toUrlPiece (BlockId (Hash bytes)) = decodeUtf8 $ convertToBase Base16 bytes


instance FromBinary BlockId where
get = BlockId . Hash <$> getByteString 32


instance FromBinary [BlockId] where
get = undefined


data Plain

instance Accept Plain where
Expand All @@ -126,7 +122,6 @@ instance MimeUnrender Plain BlockId where
mimeUnrender _ bs =
BlockId <$> Hash <$> convertFromBase Base16 (BL.toStrict bs)


data Binary

instance Accept Binary where
Expand Down

0 comments on commit 03883a5

Please sign in to comment.