Cosmos-sdk: Governance API for deposits on a proposal returns `null` after voting period closes

Created on 22 Nov 2018  路  3Comments  路  Source: cosmos/cosmos-sdk

Summary of Bug

The Governance API for deposits on a proposal (/gov/proposals/:id/deposits) returns null instead of the deposits that were associated with the proposal after the voting period closes.

This is unexpected.

It would be expected that the voting period has no effect on the JSON payload returned by a call to /gov/proposals/:id/deposits, and that the call reliably returns the deposits cast against a proposal whenever it is called.

This may be related to #2879.

Steps to Reproduce

  1. Create a Proposal
  2. Make a Vote against a Proposal
  3. Call the Governance API to retrieve the deposits against a Proposal, see that you get a valid JSON payload as a response.
  4. Wait for the voting period to close.
  5. Make the same call you made in step 3, except this time you will receive null as a response.

For Admin Use

  • [ ] Not duplicate issue
  • [ ] Appropriate labels applied
  • [ ] Appropriate contributors tagged
  • [ ] Contributor assigned/self-assigned
UX bug gov

All 3 comments

Feel free to merge this with #2879 if its felt to be a duplicate of a core issue

This is expected.

The votes are deleted after the proposal has passed or failed, as they no longer need to be kept in state.

This endpoint will need to instead query past transactions and filter accordingly.

I will be tackling this issue along with #2879.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

rigelrozanski picture rigelrozanski  路  3Comments

cwgoes picture cwgoes  路  3Comments

rigelrozanski picture rigelrozanski  路  3Comments

ValarDragon picture ValarDragon  路  3Comments

ValarDragon picture ValarDragon  路  3Comments