File tree Expand file tree Collapse file tree 2 files changed +9
-7
lines changed
test/Spec/BotPlutusInterface Expand file tree Collapse file tree 2 files changed +9
-7
lines changed Original file line number Diff line number Diff line change @@ -109,10 +109,12 @@ instance Default PABConfig where
109109 }
110110
111111data RawTx = RawTx
112- { rawType :: Text
113- , rawDescription :: Text
114- , rawCborHex :: Text
112+ { _type :: Text
113+ , _description :: Text
114+ , _cborHex :: Text
115115 }
116116 deriving (Generic , Eq , Show )
117117
118- $ (deriveJSON defaultOptions {fieldLabelModifier = drop 3 } ''RawTx)
118+ -- type is a reserved keyword in haskell and can not be used as a field name
119+ -- when converting this to JSON we drop the _ prefix from each field
120+ $ (deriveJSON defaultOptions {fieldLabelModifier = drop 1 } ''RawTx)
Original file line number Diff line number Diff line change @@ -116,9 +116,9 @@ txFileName = "tx-" <> unpack txHash <> ".raw"
116116rawTx :: RawTx
117117rawTx =
118118 RawTx
119- { rawType = " TxBodyAlonzo"
120- , rawDescription = " description"
121- , rawCborHex = " hex"
119+ { _type = " TxBodyAlonzo"
120+ , _description = " description"
121+ , _cborHex = " hex"
122122 }
123123
124124txFileContents :: LBS. ByteString
You can’t perform that action at this time.
0 commit comments