From 89258d4690f80806b65c583de7d2f369e6c1b5b7 Mon Sep 17 00:00:00 2001 From: Albert Andrejev Date: Fri, 22 Nov 2024 22:29:30 +0200 Subject: [PATCH] implement review remarks --- contracts/val-ref/src/contract.rs | 6 +++++- contracts/validators-set/src/contract.rs | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/contracts/val-ref/src/contract.rs b/contracts/val-ref/src/contract.rs index c8c1dd33..35d29a17 100644 --- a/contracts/val-ref/src/contract.rs +++ b/contracts/val-ref/src/contract.rs @@ -188,7 +188,11 @@ pub fn query(deps: Deps, _env: Env, msg: QueryMsg) -> ContractResu #[cfg_attr(not(feature = "library"), cosmwasm_std::entry_point)] pub fn reply(_deps: DepsMut, _env: Env, msg: Reply) -> ContractResult { match msg.id { - EDIT_ON_TOP_REPLY_ID => Ok(Response::new()), + EDIT_ON_TOP_REPLY_ID => Ok(response( + "reply", + CONTRACT_NAME, + [attr("edit_on_top_error", true.to_string())], + )), id => Err(ContractError::UnknownReplyId { id }), } } diff --git a/contracts/validators-set/src/contract.rs b/contracts/validators-set/src/contract.rs index db87bf50..24ce4e73 100644 --- a/contracts/validators-set/src/contract.rs +++ b/contracts/validators-set/src/contract.rs @@ -140,7 +140,7 @@ fn execute_update_validators( let total_count = validators.len(); -let old_validator_set: HashMap = VALIDATORS_SET + let old_validator_set: HashMap = VALIDATORS_SET .range_raw(deps.storage, None, None, Order::Ascending) .map(|item| item.map(|(_key, value)| (value.valoper_address.to_string(), value))) .collect::>()?;