Skip to content

Commit

Permalink
Renamed query to be more clear.
Browse files Browse the repository at this point in the history
  • Loading branch information
NoahSaso committed Nov 15, 2023
1 parent 21874f2 commit 577d3e9
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -547,10 +547,10 @@
{
"type": "object",
"required": [
"pending_proposal_id_for_approval_proposal_id"
"pre_propose_approval_id_for_approver_proposal_id"
],
"properties": {
"pending_proposal_id_for_approval_proposal_id": {
"pre_propose_approval_id_for_approver_proposal_id": {
"type": "object",
"required": [
"id"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ pub fn query(deps: Deps, env: Env, msg: QueryMsg) -> StdResult<Binary> {
QueryExt::PreProposeApprovalContract {} => {
to_binary(&PRE_PROPOSE_APPROVAL_CONTRACT.load(deps.storage)?)
}
QueryExt::PendingProposalIdForApprovalProposalId { id } => {
QueryExt::PreProposeApprovalIdForApproverProposalId { id } => {
to_binary(&PROPOSAL_ID_TO_PRE_PROPOSE_ID.may_load(deps.storage, id)?)
}
},
Expand Down
2 changes: 1 addition & 1 deletion contracts/pre-propose/dao-pre-propose-approver/src/msg.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ pub enum QueryExt {
#[returns(cosmwasm_std::Addr)]
PreProposeApprovalContract {},
#[returns(Option<u64>)]
PendingProposalIdForApprovalProposalId { id: u64 },
PreProposeApprovalIdForApproverProposalId { id: u64 },
}

pub type BaseInstantiateMsg = InstantiateBase<Empty>;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1258,7 +1258,7 @@ fn test_propose_open_proposal_submission() {
.query_wasm_smart(
pre_propose_approver.clone(),
&ApproverQueryMsg::QueryExtension {
msg: ApproverQueryExt::PendingProposalIdForApprovalProposalId {
msg: ApproverQueryExt::PreProposeApprovalIdForApproverProposalId {
id: approver_prop_id,
},
},
Expand Down

0 comments on commit 577d3e9

Please sign in to comment.