Skip to content

Voting's helper update_status() should save changed status #62

Closed
@ueco-jb

Description

Originally posted by @ueco-jb in #60 (comment)

Currently that helper might change status, for example from Open to Rejected, if contract expires.
https://github.com/confio/poe-contracts/blob/main/packages/voting-contract/src/state.rs#L206-L208
We are using that to see most recent status when someone tries to vote.
Problem is, if status is Rejected and we return an Error... Then proposal's status will be back Open, because changes were not saved on returned error.

This will be confusing and we should mitigate that.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions