Skip to content

Commit fc69901

Browse files
committed
Fix for #4924 bug that
was introduced by #4886 readScriptDataOrFile was reverted to read ScriptData json with the detailed schema format (ScriptDataJsonDetailedSchema)
1 parent 385c247 commit fc69901

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

Diff for: cardano-api/src/Cardano/Api/ScriptData.hs

+2-2
Original file line numberDiff line numberDiff line change
@@ -490,9 +490,9 @@ data ScriptDataJsonBytesError
490490

491491
instance Error ScriptDataJsonBytesError where
492492
displayError (ScriptDataJsonBytesErrorValue e) =
493-
"Error decoding ScriptData JSON value: " <> show e
493+
"Error decoding ScriptData JSON value: " <> displayError e
494494
displayError (ScriptDataJsonBytesErrorInvalid e) =
495-
"ScriptData is invalid: " <> show e
495+
"ScriptData is invalid: " <> displayError e
496496

497497

498498
-- | This allows us to take JSON formatted ScriptData and encode it in the CDDL format

Diff for: cardano-cli/src/Cardano/CLI/Shelley/Run/Read.hs

+1-1
Original file line numberDiff line numberDiff line change
@@ -366,7 +366,7 @@ readScriptDataOrFile (ScriptDataJsonFile fp) = do
366366
sDataValue <- hoistEither . first (ScriptDataErrorJsonParse fp) $ Aeson.eitherDecode sDataBs
367367
hoistEither
368368
. first ScriptDataErrorJsonBytes
369-
$ scriptDataJsonToHashable ScriptDataJsonNoSchema sDataValue
369+
$ scriptDataJsonToHashable ScriptDataJsonDetailedSchema sDataValue
370370

371371
readScriptDataOrFile (ScriptDataCborFile fp) = do
372372
origBs <- handleIOExceptT (ScriptDataErrorFile . FileIOError fp) (BS.readFile fp)

0 commit comments

Comments
 (0)