File tree 2 files changed +10
-396
lines changed
hydra-node/src/Hydra/Ledger
2 files changed +10
-396
lines changed Original file line number Diff line number Diff line change @@ -27,7 +27,9 @@ import Cardano.Ledger.Shelley.Rules qualified as Ledger
27
27
import Cardano.Ledger.Shelley.UTxO qualified as Ledger
28
28
import Codec.CBOR.Decoding qualified as CBOR
29
29
import Codec.CBOR.Encoding qualified as CBOR
30
+ import Codec.CBOR.Write qualified as CBOR.Write
30
31
import Control.Monad (foldM )
32
+ import Data.Aeson qualified as Aeson
31
33
import Data.ByteString qualified as BS
32
34
import Data.Default (def )
33
35
import Data.Map.Strict qualified as Map
@@ -125,7 +127,7 @@ instance FromCBOR Tx where
125
127
(pure . fromLedgerTx)
126
128
127
129
instance ToJSON Tx where
128
- toJSON = toJSON . toLedgerTx
130
+ toJSON = Aeson. String . decodeUtf8 . CBOR.Write. toStrictByteString . toCBOR
129
131
130
132
instance FromJSON Tx where
131
133
parseJSON = fmap fromLedgerTx . parseJSON
You can’t perform that action at this time.
0 commit comments