anchor-token-contracts icon indicating copy to clipboard operation
anchor-token-contracts copied to clipboard

query shows poll status in progress while cast vote errors with not i…

Open kaisbaccour opened this issue 3 years ago • 0 comments

Hey guys, I Found this issue while copying your code to terra-vegas casino This issue is a confusing query issue in the governance contract. The confusion happens in this line https://github.com/Anchor-Protocol/anchor-token-contracts/blob/main/contracts/gov/src/contract.rs#L598

This happens when the voting period is finished but no tx has happened yet. This could be mitigated by adding a new condition on the query function to make sure we send the right response.

I put the Status to Expired because I did not want to add a new PollStatus::WaitingOnTransactionToEndPoll. But I believer a new status should be there to better describe the Poll status

kaisbaccour avatar Mar 04 '22 00:03 kaisbaccour