Skip to content

Commit 93a793b

Browse files
BigtoCchipshort
authored andcommitted
Rollback changes
1 parent ccd6b3e commit 93a793b

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
@@ -85,7 +85,7 @@ pub use crate::math::{
8585
Int512, Int64, Isqrt, SignedDecimal, SignedDecimal256, SignedDecimal256RangeExceeded,
8686
SignedDecimalRangeExceeded, Uint128, Uint256, Uint512, Uint64,
8787
};
88-
pub use crate::metadata::{DenomMetadata, DenomUnit, NullableDenomMetadata, NullableDenomUnit};
88+
pub use crate::metadata::{DenomMetadata, DenomUnit};
8989
pub use crate::msgpack::{from_msgpack, to_msgpack_binary, to_msgpack_vec};
9090
pub use crate::never::Never;
9191
pub use crate::pagination::PageRequest;
@@ -96,8 +96,8 @@ pub use crate::query::{
9696
DelegationRewardsResponse, DelegationTotalRewardsResponse, DelegatorReward,
9797
DelegatorValidatorsResponse, DelegatorWithdrawAddressResponse, DenomMetadataResponse,
9898
DistributionQuery, FeeEnabledChannelResponse, FullDelegation, GrpcQuery, IbcQuery,
99-
ListChannelsResponse, NullableDenomMetadataResponse, PortIdResponse, QueryRequest,
100-
StakingQuery, SupplyResponse, Validator, ValidatorResponse, WasmQuery,
99+
ListChannelsResponse, PortIdResponse, QueryRequest, StakingQuery, SupplyResponse, Validator,
100+
ValidatorResponse, WasmQuery,
101101
};
102102
#[cfg(all(feature = "stargate", feature = "cosmwasm_1_2"))]
103103
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
@@ -22,14 +22,14 @@ use crate::query::{
2222
#[cfg(feature = "cosmwasm_1_3")]
2323
use crate::query::{
2424
AllDenomMetadataResponse, DelegatorWithdrawAddressResponse, DenomMetadataResponse,
25-
DistributionQuery, NullableDenomMetadataResponse,
25+
DistributionQuery,
2626
};
2727
use crate::results::{ContractResult, Empty, SystemResult};
2828
use crate::ContractInfoResponse;
2929
use crate::{from_json, to_json_binary, to_json_vec, Binary};
3030
use crate::{Addr, CanonicalAddr};
3131
#[cfg(feature = "cosmwasm_1_3")]
32-
use crate::{DenomMetadata, NullableDenomMetadata, PageRequest};
32+
use crate::{DenomMetadata, PageRequest};
3333
use crate::{RecoverPubkeyError, StdError, StdResult, VerificationError};
3434

3535
#[derive(Clone, Copy, Debug)]
@@ -468,19 +468,6 @@ impl<'a, C: CustomQuery> QuerierWrapper<'a, C> {
468468
Ok(res.metadata)
469469
}
470470

471-
#[cfg(feature = "cosmwasm_1_3")]
472-
pub fn query_nullable_denom_metadata(
473-
&self,
474-
denom: impl Into<String>,
475-
) -> StdResult<NullableDenomMetadata> {
476-
let request = BankQuery::DenomMetadata {
477-
denom: denom.into(),
478-
}
479-
.into();
480-
let res: NullableDenomMetadataResponse = self.query(&request)?;
481-
Ok(res.metadata)
482-
}
483-
484471
#[cfg(feature = "cosmwasm_1_3")]
485472
pub fn query_all_denom_metadata(
486473
&self,

0 commit comments

Comments
 (0)