DA0-DA0 / dao-contracts

CosmWasm smart contracts for Interchain DAOs.
https://docs.daodao.zone
BSD 3-Clause "New" or "Revised" License
202 stars 132 forks source link

Added message to reset approver back to DAO #774

Closed NoahSaso closed 6 months ago

NoahSaso commented 7 months ago

Currently, setting up the dao-pre-propose-approver contract is a one-way operation. Once the dao-pre-propose-approval-single's approver is set to the approver contract, there is no way to reset it back to the DAO. This is because the approval-single contract requires the current approver to be the one calling the update_approver execute message.

This PR adds a message to the approver contract to undo its setup, setting the approver back to the DAO and unregistering the proposal completed hook.

codecov[bot] commented 7 months ago

Codecov Report

Attention: 36 lines in your changes are missing coverage. Please review.

Comparison is base (1187dba) 96.32% compared to head (2a219e9) 96.25%.

Files Patch % Lines
...e-propose/dao-pre-propose-approver/src/contract.rs 0.00% 35 Missing :warning:
...ts/pre-propose/dao-pre-propose-approver/src/msg.rs 0.00% 1 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## development #774 +/- ## =============================================== - Coverage 96.32% 96.25% -0.07% =============================================== Files 203 203 Lines 50186 50222 +36 =============================================== Hits 48341 48341 - Misses 1845 1881 +36 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

codecov[bot] commented 7 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Comparison is base (a3a72db) 96.45% compared to head (5ab004f) 96.50%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## development #774 +/- ## =============================================== + Coverage 96.45% 96.50% +0.04% =============================================== Files 204 204 Lines 52395 52518 +123 =============================================== + Hits 50537 50680 +143 + Misses 1858 1838 -20 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.