Skip to content

Commit

Permalink
Clippy fix
Browse files Browse the repository at this point in the history
  • Loading branch information
ismellike committed Apr 15, 2024
1 parent 4a81746 commit 68b7f74
Showing 1 changed file with 14 additions and 15 deletions.
29 changes: 14 additions & 15 deletions contracts/external/cw-abc/src/commands.rs
Original file line number Diff line number Diff line change
Expand Up @@ -418,27 +418,26 @@ fn is_allowlisted_through_daos(
storage: &dyn Storage,
hatcher: &Addr,
) -> bool {
for result in hatcher_allowlist()
for (dao, _) in hatcher_allowlist()
.idx
.config_type
.prefix(HatcherAllowlistConfigType::DAO {}.to_string())
.range(storage, None, None, cosmwasm_std::Order::Ascending)
.flatten()
{
if let Ok((dao, _)) = result {
let voting_power_response_result: StdResult<
dao_interface::voting::VotingPowerAtHeightResponse,
> = querier.query_wasm_smart(
dao,
&dao_interface::msg::QueryMsg::VotingPowerAtHeight {
address: hatcher.to_string(),
height: None,
},
);
let voting_power_response_result: StdResult<
dao_interface::voting::VotingPowerAtHeightResponse,
> = querier.query_wasm_smart(
dao,
&dao_interface::msg::QueryMsg::VotingPowerAtHeight {
address: hatcher.to_string(),
height: None,
},
);

if let Ok(voting_power_response) = voting_power_response_result {
if voting_power_response.power > Uint128::zero() {
return true;
}
if let Ok(voting_power_response) = voting_power_response_result {
if voting_power_response.power > Uint128::zero() {
return true;
}
}
}
Expand Down

0 comments on commit 68b7f74

Please sign in to comment.