Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 4677763

Browse files
committedMar 2, 2023
Fix for #4924 bug that
was introduced by #4886 readScriptDataOrFile was reverted to read ScriptData json with the detailed schema format (ScriptDataJsonDetailedSchema)
1 parent 3b21b2d commit 4677763

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed
 

‎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

‎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)
Please sign in to comment.