Skip to content

Commit

Permalink
refactor: is eligible query to be more future proof
Browse files Browse the repository at this point in the history
  • Loading branch information
gluax committed Aug 15, 2024
1 parent ebe5722 commit c53b13c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/msgs/staking/query.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ pub enum QueryMsg {
#[cfg_attr(feature = "cosmwasm", returns(StakerAndSeq))]
GetStakerAndSeq { public_key: String },
#[cfg_attr(feature = "cosmwasm", returns(bool))]
IsExecutorEligible { public_key: String },
IsExecutorEligible { proof: String, dr_id: String },
#[cfg_attr(feature = "cosmwasm", returns(StakingConfig))]
GetStakingConfig {},
}
Expand Down
6 changes: 4 additions & 2 deletions src/msgs/staking/query_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,13 @@ fn json_get_staker_and_seq() {
fn json_is_executor_eligible() {
let expected_json = json!({
"is_executor_eligible": {
"public_key": "public_key"
"proof": "public_key",
"dr_id": "dr_id"
}
});
let msg: QueryMsg = StakingQueryMsg::IsExecutorEligible {
public_key: "public_key".to_string(),
proof: "public_key".to_string(),
dr_id: "dr_id".to_string(),
}
.into();
assert_json_ok(msg, expected_json);
Expand Down

0 comments on commit c53b13c

Please sign in to comment.