-
Notifications
You must be signed in to change notification settings - Fork 25
Deprecate certificate in tx certificates #962
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
base: master
Are you sure you want to change the base?
Conversation
d0ae67a
to
d165125
Compare
34eb78c
to
6bf3263
Compare
6bf3263
to
62b27ed
Compare
62b27ed
to
457550a
Compare
457550a
to
ebdf22b
Compare
cardano-api/src/Cardano/Api/Experimental/Tx/Internal/Compatible.hs
Outdated
Show resolved
Hide resolved
|
||
let stakeCreds = fromList $ mapMaybe filterUnRegCreds certs | ||
drepCreds = fromList $ mapMaybe filterUnRegDRepCreds certs | ||
-- TODO: Left off here fix filterUnRegCreds |
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.
Remove comment
filterUnRegCreds sbe (Exp.Certificate cert) = | ||
fmap fromShelleyStakeCredential $ | ||
shelleyBasedEraConstraints sbe $ | ||
Ledger.lookupUnRegStakeTxCert cert |
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.
That's cool, so many hours were wasted here on figuring out the correct implementation here.
instance Error AnchorDataFromCertificateError where | ||
prettyError :: AnchorDataFromCertificateError -> Doc ann | ||
prettyError (InvalidPoolMetadataHashError url hash) = | ||
"Invalid pool metadata hash for URL " <> fromString (show url) <> ": " <> fromString (show hash) |
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.
afair show
will quote the argument, so if you don't want quotes, this should be easier
"Invalid pool metadata hash for URL " <> fromString (show url) <> ": " <> fromString (show hash) | |
"Invalid pool metadata hash for URL " <> pretty url <> ": " <> pretty hash |
or this seems more idiomatic:
"Invalid pool metadata hash for URL " <> fromString (show url) <> ": " <> fromString (show hash) | |
"Invalid pool metadata hash for URL " <> dquotes (pretty url) <> ": " <> dquotes (pretty hash) |
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
ebdf22b
to
45eae26
Compare
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.
It all looks good 👍. I wonder why we had a property around Ord
. And we could probably preserve it somehow, but not sure why that was important
@palas partially because of this definition: TxCertificates
:: ShelleyBasedEra era
-> OMap
(Certificate era)
( BuildTxWith
build
(Maybe (StakeCredential, Witness WitCtxStake era))
)
-> TxCertificates build era Because the certificate is just wrapper over ledger's |
Changelog
Context
Additional context for the PR goes here. If the PR fixes a particular issue please provide a link to the issue.
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