near-daos / sputnik-dao-contract

Smart contracts for https://app.astrodao.com
https://astrodao.com/
MIT License
108 stars 80 forks source link

Public function proposal_status doesn't act as expected #31

Closed mikedotexe closed 3 years ago

mikedotexe commented 3 years ago

At the top of proposal_status is an assertion that doesn't seem to belong there. It will panic if the status is not InProgress It seems that this can easily be removed as the only two places where it's called are guarded against the same assertion.

Not a difficult ticket, just documenting here for a small PR, and so we don't combine a bunch of changes into on PR.

After this assertion is removed, users can expect to call this public function and not get an error.

mikedotexe commented 3 years ago

Actually, this isn't what I thought the function should be. It's possible we want to have this be pub(crate) fn instead, but closing this issue with my new knowledge