-
Notifications
You must be signed in to change notification settings - Fork 23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ToJSON
instance for TxValidationError
#379
Conversation
import qualified Data.Text as Text | ||
import Prettyprinter | ||
|
||
newtype ShowOf a = ShowOf a |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think a little motivation comment would be helpful in the long term. I believe here the main point of ShowOf
is that you want to capture when Show
can be lifted to ToJSON
, right? I think stating this motivation would help maintenance in the long term (and onboarding of newcomers to the codebase (speaking for a friend)).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
…ep-registration-certificate drep registration-certificate: add a golden test
Changelog
Context
This is needed for reporting errors in machine readable JSON.
Note that the error tree is not completely converted to JSON structure. Some sub-branches remain as strings because the ledger does not export enough symbols to go all the way down to the leaves.
In any case, these instances are a stop-gap until the instances are implemented in the ledger proper.
How to trust this PR
Highlight important bits of the PR that will make the review faster. If there are commands the reviewer can run to observe the new behavior, describe them.
Checklist