Skip to content

Commit

Permalink
Actually use the correct method to access the information
Browse files Browse the repository at this point in the history
  • Loading branch information
plaidfinch committed Feb 22, 2024
1 parent 131b98c commit b4cc612
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions crates/core/component/governance/src/component/rpc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -360,14 +360,12 @@ impl QueryService for Server {
} else {
// If the query is for the total voting power at the start of the proposal, return that
let total_voting_power = state
.get_proto::<u64>(&state_key::all_voting_power_at_proposal_start(
proposal_id,
))
.total_voting_power_at_proposal_start(proposal_id)
.await
.map_err(|e| tonic::Status::internal(format!("error accessing storage: {}", e)))?;

Ok(tonic::Response::new(VotingPowerAtProposalStartResponse {
voting_power: total_voting_power.expect("total voting power should be set"),
voting_power: total_voting_power,
}))
}
}
Expand Down

0 comments on commit b4cc612

Please sign in to comment.