Skip to content

Commit

Permalink
Remove AlonzoTx JSON instances
Browse files Browse the repository at this point in the history
  • Loading branch information
locallycompact committed Jan 10, 2024
1 parent 3c8f217 commit 87dbbe6
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 396 deletions.
4 changes: 3 additions & 1 deletion hydra-node/src/Hydra/Ledger/Cardano.hs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,9 @@ import Cardano.Ledger.Shelley.Rules qualified as Ledger
import Cardano.Ledger.Shelley.UTxO qualified as Ledger
import Codec.CBOR.Decoding qualified as CBOR
import Codec.CBOR.Encoding qualified as CBOR
import Codec.CBOR.Write qualified as CBOR.Write
import Control.Monad (foldM)
import Data.Aeson qualified as Aeson
import Data.ByteString qualified as BS
import Data.Default (def)
import Data.Map.Strict qualified as Map
Expand Down Expand Up @@ -125,7 +127,7 @@ instance FromCBOR Tx where
(pure . fromLedgerTx)

instance ToJSON Tx where
toJSON = toJSON . toLedgerTx
toJSON = Aeson.String . decodeUtf8 . CBOR.Write.toStrictByteString . toCBOR

instance FromJSON Tx where
parseJSON = fmap fromLedgerTx . parseJSON
Expand Down
Loading

0 comments on commit 87dbbe6

Please sign in to comment.