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

feat: implement simplified unbonding and rewards queries #313

Merged
merged 5 commits into from
Feb 28, 2024

Conversation

emidev98
Copy link
Contributor

@emidev98 emidev98 commented Feb 23, 2024

As per the following issue #279 this PR implements a simplified way to query the unbondings and redelegations. It also includes tests and fixes for the other queries that does not return the right values.

These features were requested by @arthuryeti to simplify building frontends

Copy link
Member

@javiersuweijie javiersuweijie left a comment

Choose a reason for hiding this comment

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

LGTM, but missing tests

@javiersuweijie javiersuweijie changed the base branch from chore/v0.4.x/remove/deprecations to release/v0.4.x February 26, 2024 03:46
@@ -249,7 +249,6 @@ message QueryAllianceUnbondingsByDelegatorResponse {
option (gogoproto.goproto_getters) = false;

repeated UnbondingDelegation unbondings = 1 [(gogoproto.nullable) = false];
cosmos.base.query.v1beta1.PageResponse pagination = 2;
Copy link
Member

Choose a reason for hiding this comment

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

why we remove this?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Because we don't have a way to paginate that specific request and the amount of items to be recovered from the API is number_of_alliances * 7 (maximum undelegations)

Copy link
Member

@javiersuweijie javiersuweijie left a comment

Choose a reason for hiding this comment

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

Still missing the tests for the new API

@emidev98
Copy link
Contributor Author

@javiersuweijie the tests for the new API are added here:

If you want I can add more tests or I can try covering edge cases

@javiersuweijie javiersuweijie merged commit 621d2fb into release/v0.4.x Feb 28, 2024
3 checks passed
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.

2 participants