Skip to content

Commit d6cb88c

Browse files
committed
Rollback changes
1 parent bb6693b commit d6cb88c

File tree

3 files changed

+8
-30
lines changed

3 files changed

+8
-30
lines changed

packages/std/src/lib.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ pub use crate::math::{
8282
Int512, Int64, Isqrt, SignedDecimal, SignedDecimal256, SignedDecimal256RangeExceeded,
8383
SignedDecimalRangeExceeded, Uint128, Uint256, Uint512, Uint64,
8484
};
85-
pub use crate::metadata::{DenomMetadata, DenomUnit, NullableDenomMetadata, NullableDenomUnit};
85+
pub use crate::metadata::{DenomMetadata, DenomUnit};
8686
pub use crate::msgpack::{from_msgpack, to_msgpack_binary, to_msgpack_vec};
8787
pub use crate::never::Never;
8888
pub use crate::pagination::PageRequest;
@@ -93,8 +93,8 @@ pub use crate::query::{
9393
DelegationRewardsResponse, DelegationTotalRewardsResponse, DelegatorReward,
9494
DelegatorValidatorsResponse, DelegatorWithdrawAddressResponse, DenomMetadataResponse,
9595
DistributionQuery, FeeEnabledChannelResponse, FullDelegation, GrpcQuery, IbcQuery,
96-
ListChannelsResponse, NullableDenomMetadataResponse, PortIdResponse, QueryRequest,
97-
StakingQuery, SupplyResponse, Validator, ValidatorResponse, WasmQuery,
96+
ListChannelsResponse, PortIdResponse, QueryRequest, StakingQuery, SupplyResponse, Validator,
97+
ValidatorResponse, WasmQuery,
9898
};
9999
#[cfg(all(feature = "stargate", feature = "cosmwasm_1_2"))]
100100
pub use crate::results::WeightedVoteOption;

packages/std/src/query/bank.rs

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,12 @@ use serde::{Deserialize, Serialize};
33

44
use crate::Coin;
55

6-
use super::query_response::QueryResponseType;
76
use crate::prelude::*;
87
#[cfg(feature = "cosmwasm_1_3")]
98
use crate::PageRequest;
10-
use crate::{Binary, DenomMetadata, NullableDenomMetadata};
9+
use crate::{Binary, DenomMetadata};
10+
11+
use super::query_response::QueryResponseType;
1112

1213
#[non_exhaustive]
1314
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, Eq, JsonSchema)]
@@ -84,16 +85,6 @@ pub struct DenomMetadataResponse {
8485

8586
impl_response_constructor!(DenomMetadataResponse, metadata: DenomMetadata);
8687

87-
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, Eq, JsonSchema)]
88-
#[serde(rename_all = "snake_case")]
89-
#[non_exhaustive]
90-
pub struct NullableDenomMetadataResponse {
91-
/// The metadata for the queried denom.
92-
pub metadata: NullableDenomMetadata,
93-
}
94-
95-
impl_response_constructor!(NullableDenomMetadataResponse, metadata: NullableDenomMetadata);
96-
9788
impl QueryResponseType for DenomMetadataResponse {}
9889

9990
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, Eq, JsonSchema)]

packages/std/src/traits.rs

Lines changed: 2 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,14 @@ use crate::query::{
2121
#[cfg(feature = "cosmwasm_1_3")]
2222
use crate::query::{
2323
AllDenomMetadataResponse, DelegatorWithdrawAddressResponse, DenomMetadataResponse,
24-
DistributionQuery, NullableDenomMetadataResponse,
24+
DistributionQuery,
2525
};
2626
use crate::results::{ContractResult, Empty, SystemResult};
2727
use crate::ContractInfoResponse;
2828
use crate::{from_json, to_json_binary, to_json_vec, Binary};
2929
use crate::{Addr, CanonicalAddr};
3030
#[cfg(feature = "cosmwasm_1_3")]
31-
use crate::{DenomMetadata, NullableDenomMetadata, PageRequest};
31+
use crate::{DenomMetadata, PageRequest};
3232
use crate::{RecoverPubkeyError, StdError, StdResult, VerificationError};
3333

3434
#[derive(Clone, Copy, Debug)]
@@ -454,19 +454,6 @@ impl<'a, C: CustomQuery> QuerierWrapper<'a, C> {
454454
Ok(res.metadata)
455455
}
456456

457-
#[cfg(feature = "cosmwasm_1_3")]
458-
pub fn query_nullable_denom_metadata(
459-
&self,
460-
denom: impl Into<String>,
461-
) -> StdResult<NullableDenomMetadata> {
462-
let request = BankQuery::DenomMetadata {
463-
denom: denom.into(),
464-
}
465-
.into();
466-
let res: NullableDenomMetadataResponse = self.query(&request)?;
467-
Ok(res.metadata)
468-
}
469-
470457
#[cfg(feature = "cosmwasm_1_3")]
471458
pub fn query_all_denom_metadata(
472459
&self,

0 commit comments

Comments
 (0)