Skip to content

Commit

Permalink
treefmt
Browse files Browse the repository at this point in the history
  • Loading branch information
locallycompact committed Jan 18, 2024
1 parent 1b9840b commit 18eff12
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions hydra-node/src/Hydra/Ledger/Cardano.hs
Original file line number Diff line number Diff line change
Expand Up @@ -131,12 +131,11 @@ instance FromCBOR Tx where
instance ToJSON Tx where
toJSON tx =
let TextEnvelopeType envelopeType = textEnvelopeType (proxyToAsType (Proxy @Tx))
in
object
[ "cborHex" .= (Aeson.String $ decodeUtf8 $ Base16.encode $ serialiseToCBOR tx)
, "txId" .= (txId tx)
, "type" .= envelopeType
]
in object
[ "cborHex" .= (Aeson.String $ decodeUtf8 $ Base16.encode $ serialiseToCBOR tx)
, "txId" .= (txId tx)
, "type" .= envelopeType
]

instance FromJSON Tx where
parseJSON =
Expand Down

0 comments on commit 18eff12

Please sign in to comment.