Skip to content

Commit

Permalink
ic-ref-run: Pretty print candid values without type table (#22)
Browse files Browse the repository at this point in the history
fixes #21
  • Loading branch information
nomeata authored Jul 12, 2021
1 parent 996511a commit f398532
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/ic-ref-run.hs
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ printReqResponse (ReadStateResponse _ ) = error "dead code in ic-ref"
candidOrPretty :: Blob -> String
candidOrPretty b
| BC.pack "DIDL" `B.isPrefixOf` b
, Right vs <- Candid.decodeVals b
, Right (_, vs) <- Candid.decodeVals b
= show (pretty vs)
| otherwise
= "(" ++ prettyBlob b ++ ")"
Expand Down

0 comments on commit f398532

Please sign in to comment.