Skip to content

Commit

Permalink
evil: client from context in rpc
Browse files Browse the repository at this point in the history
  • Loading branch information
grarco committed Oct 20, 2023
1 parent ed12b23 commit cf1db81
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions apps/src/lib/client/rpc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1121,23 +1121,23 @@ pub async fn query_proposal_result<'a>(
governance_storage::get_proposal_result_key(proposal_id);
let proposal_result =
// Try to directly query the result in storage first
match query_storage_value(client, &proposal_result_key).await {
match query_storage_value(context.client(), &proposal_result_key).await {
Ok(result) => result,
Err(_) => {
// If failure, run the tally
let is_author_steward = query_pgf_stewards(client)
let is_author_steward = query_pgf_stewards(context.client())
.await
.iter()
.any(|steward| steward.address.eq(&proposal.author));
let tally_type = proposal.get_tally_type(is_author_steward);
let total_voting_power = get_total_staked_tokens(
client,
context.client(),
proposal.voting_end_epoch,
)
.await;

let votes = compute_proposal_votes(
client,
context.client(),
proposal_id,
proposal.voting_end_epoch,
)
Expand Down

0 comments on commit cf1db81

Please sign in to comment.