Skip to content
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

cli: Improve stake-address-info query output #1671

Merged
merged 1 commit into from
Aug 13, 2020

Conversation

erikd
Copy link
Contributor

@erikd erikd commented Aug 12, 2020

No description provided.

Copy link
Contributor

@intricate intricate left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Just a suggestion.

-> Aeson.Value
delegAndRwdToJson (k, (d, r)) =
Aeson.object
[ "address" .= toKey k
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would rename this toKey function since the resulting value is not being used as a key in a map anymore.

Alternatively, since toKey isn't actually being reused, factor it out entirely and do serialiseAddress (StakeAddress (toShelleyNetwork nw) k).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Renamed to renderAddress .

The previous output was a JSON object, with a key for each address. The
new output is a list of homogenous objects so that the same object
parser should work for all objects in the list.

Closes: #1546
@erikd
Copy link
Contributor Author

erikd commented Aug 13, 2020

bors merge

@iohk-bors
Copy link
Contributor

iohk-bors bot commented Aug 13, 2020

@iohk-bors iohk-bors bot merged commit e89aa82 into master Aug 13, 2020
@iohk-bors iohk-bors bot deleted the erikd/stake-address-info branch August 13, 2020 03:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants