Skip to content

Commit

Permalink
imp: mark 'IcaQueryResponse' non_exhaustive and remove 'staking' feat…
Browse files Browse the repository at this point in the history
…ure gate (#123)

* imp: removed some feature gating

* imp: added more 'non_exhaustive'
  • Loading branch information
srdtrk committed Jun 18, 2024
1 parent c259f00 commit 5a65b07
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions src/types/query_msg.rs
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@ mod response {
}

/// The response for a successful ICA query.
#[non_exhaustive]
#[cw_serde]
pub enum IcaQueryResponse {
/// Response for a [`cosmwasm_std::BankQuery`].
Expand All @@ -119,11 +120,11 @@ mod response {
path: String,
},
/// Response for a [`cosmwasm_std::StakingQuery`].
#[cfg(feature = "staking")]
Staking(StakingQueryResponse),
}

/// The response type for the [`cosmwasm_std::BankQuery`] queries.
#[non_exhaustive]
#[cw_serde]
pub enum BankQueryResponse {
/// Response for the [`cosmwasm_std::BankQuery::Supply`] query.
Expand All @@ -139,7 +140,7 @@ mod response {
}

/// The response type for the [`cosmwasm_std::StakingQuery`] queries.
#[cfg(feature = "staking")]
#[non_exhaustive]
#[cw_serde]
pub enum StakingQueryResponse {
/// Response for the [`cosmwasm_std::StakingQuery::BondedDenom`] query.
Expand All @@ -155,23 +156,20 @@ mod response {
}

/// Response for the [`cosmwasm_std::StakingQuery::Delegation`] query over ICA.
#[cfg(feature = "staking")]
#[cw_serde]
pub struct IcaDelegationResponse {
/// The delegation response if it exists.
pub delegation: Option<Delegation>,
}

/// Response for the [`cosmwasm_std::StakingQuery::AllDelegations`] query over ICA.
#[cfg(feature = "staking")]
#[cw_serde]
pub struct IcaAllDelegationsResponse {
/// The delegations.
pub delegations: Vec<Delegation>,
}

/// Delegation is the detailed information about a delegation.
#[cfg(feature = "staking")]
#[cw_serde]
pub struct Delegation {
/// The delegator address.
Expand Down

0 comments on commit 5a65b07

Please sign in to comment.