Skip to content

Commit

Permalink
return update_staking func
Browse files Browse the repository at this point in the history
  • Loading branch information
joldie777 committed Jun 7, 2024
1 parent a09972b commit 31e2282
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions contracts/neutron_interchain_queries/src/testing/mock_querier.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ use std::marker::PhantomData;

use cosmwasm_std::testing::{MockApi, MockQuerier, MockStorage};
use cosmwasm_std::{
from_json, Binary, Coin, ContractResult, CustomQuery, OwnedDeps, Querier, QuerierResult,
QueryRequest, SystemError, SystemResult, Uint128,
from_json, Binary, Coin, ContractResult, CustomQuery, FullDelegation, OwnedDeps, Querier,
QuerierResult, QueryRequest, SystemError, SystemResult, Uint128, Validator,
};
use schemars::JsonSchema;
use serde::{Deserialize, Serialize};
Expand Down Expand Up @@ -83,6 +83,15 @@ impl WasmMockQuerier {
}
}

pub fn _update_staking(
&mut self,
denom: &str,
validators: &[Validator],
delegations: &[FullDelegation],
) {
self.base.staking.update(denom, validators, delegations);
}

pub fn add_query_response(&mut self, query_id: u64, response: Binary) {
self.query_responses.insert(query_id, response);
}
Expand Down

0 comments on commit 31e2282

Please sign in to comment.