Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
clients/horizonclient: Add support for Accounts endpoint. #2229
clients/horizonclient: Add support for Accounts endpoint. #2229
Changes from 1 commit
f9a0229
47bef85
a07d103
b1c488d
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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 doesn't seem great that we have two structs with very similar names
AccountsRequest
vsAccountRequest
. Is there something we can do to name them more clearly?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 don't really like the plural name AccountsRequest`)
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.
@ire-and-curses I agree with you, initially I thought about following a similar approach for
EffectRequest
, but it seems to me that we are trying to do too much with those structs.That said though, we could be consistent and try to follow a similar approach. Basically extend the
AccountRequest
struct to also takeForSigner
andForAsset
. When called throughclient.Accounts
they will be the only fields we look at + Page params, ignoring the rest.I personally don't like that interface, but it is consistent with how the other
*Request
like structs behave.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 this is okay given that we can't make it more consistent with other functions without it being backwards compatible, and the alternatives of smooshing the two types together into a single shared types would be worse and could result in bad human errors. The compiler will make sure the caller uses the right type so whilst there might be some confusion with similar named types any errors arising from that should be prevented.