Skip to content

Commit

Permalink
add attribute to migration to debug
Browse files Browse the repository at this point in the history
  • Loading branch information
NeverHappened committed Mar 5, 2024
1 parent f37f27f commit 4102aff
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion contracts/subdaos/cwd-subdao-timelock-single/src/contract.rs
Original file line number Diff line number Diff line change
Expand Up @@ -344,6 +344,7 @@ pub fn migrate(deps: DepsMut, env: Env, _msg: MigrateMsg) -> Result<Response, Co
.into_iter()
.map(|(_, proposal)| proposal)
.collect();
let mut res: Vec<String> = vec![];
for mut item in props {
let overrule_proposal_id: u64 = deps.querier.query_wasm_smart(
&config.overrule_pre_propose,
Expand All @@ -367,11 +368,12 @@ pub fn migrate(deps: DepsMut, env: Env, _msg: MigrateMsg) -> Result<Response, Co

if overrule_proposal.proposal.status == Status::Closed {
item.status = ProposalStatus::Overruled;
res.push(item.id.to_string());
PROPOSALS.save(deps.storage, item.id, &item)?;
}
}

Ok(Response::default())
Ok(Response::default().add_attribute("migrated_proposal_ids", res.join(",")))
}

fn is_overrule_proposal_denied(
Expand Down

0 comments on commit 4102aff

Please sign in to comment.