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

fix: Staking delegations should return empty list instead of rpc error when no records found #9423

Conversation

likhita-809
Copy link
Contributor

closes: #9356

…khita/staking-delegations-returns-empty-list-instead-of-rpc-error-when-no-records-found
@likhita-809 likhita-809 changed the title fix: Staking delegations returns empty list instead of rpc error when no records found fix: Staking delegations should return empty list instead of rpc error when no records found May 29, 2021
@github-actions github-actions bot added the C:CLI label May 29, 2021
@codecov
Copy link

codecov bot commented May 29, 2021

Codecov Report

Merging #9423 (7e46624) into master (98fbdbd) will decrease coverage by 0.01%.
The diff coverage is n/a.

❗ Current head 7e46624 differs from pull request most recent head a83cf55. Consider uploading reports for the commit a83cf55 to get more accurate results
Impacted file tree graph

@@            Coverage Diff             @@
##           master    #9423      +/-   ##
==========================================
- Coverage   60.41%   60.39%   -0.02%     
==========================================
  Files         589      589              
  Lines       37107    37103       -4     
==========================================
- Hits        22417    22409       -8     
- Misses      12712    12715       +3     
- Partials     1978     1979       +1     
Impacted Files Coverage Δ
x/staking/keeper/grpc_query.go 62.37% <ø> (-0.51%) ⬇️
x/auth/legacy/v043/store.go 64.28% <0.00%> (-2.86%) ⬇️

@likhita-809 likhita-809 marked this pull request as ready for review May 31, 2021 05:20
Copy link
Contributor

@atheeshp atheeshp left a comment

Choose a reason for hiding this comment

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

lgtm

x/staking/keeper/grpc_query_test.go Outdated Show resolved Hide resolved
x/staking/keeper/grpc_query_test.go Outdated Show resolved Hide resolved
Copy link
Contributor

@aleem1314 aleem1314 left a comment

Choose a reason for hiding this comment

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

lgtm, changelog is missing

@blushi blushi added the A:automerge Automatically merge PR once all prerequisites pass. label Jun 1, 2021
…list-instead-of-rpc-error-when-no-records-found
@mergify mergify bot merged commit da87ab0 into master Jun 1, 2021
@mergify mergify bot deleted the likhita/staking-delegations-returns-empty-list-instead-of-rpc-error-when-no-records-found branch June 1, 2021 15:17
devon-chain pushed a commit to PundiAI/cosmos-sdk that referenced this pull request May 18, 2022
…r when no records found (cosmos#9423)

* return empty list instead of rpc error when no records found for staking delegations

* fix grpc query DelegatorDelegations tests

* remove response code tests for staking delegations

* fix failing tests

* change staking delegations response code to 200 in grpc test

* add staking delegations response code tests to TestQueryDelegatorDelegationsGRPC

* add address without delegations testcase

* add changes to grpc query tests of delegatorDelegations

* remove getRequest unused function from x/staking/client/rest/grpc_query_test.go

* minor fixes

* add testcases for request with no delegations

* address review comments

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>

(cherry picked from commit da87ab0)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A:automerge Automatically merge PR once all prerequisites pass. C:CLI C:x/staking
Projects
None yet
Development

Successfully merging this pull request may close these issues.

/cosmos/staking/v1beta1/delegations/{delegator_addr} returns an error if no records are found
4 participants