diff --git a/packages/neutron-sdk/src/bindings/msg.rs b/packages/neutron-sdk/src/bindings/msg.rs index 8da2abaf..df2c1ad4 100644 --- a/packages/neutron-sdk/src/bindings/msg.rs +++ b/packages/neutron-sdk/src/bindings/msg.rs @@ -1,9 +1,9 @@ use crate::{ bindings::types::{KVKey, ProtobufAny}, - interchain_queries::types::{QueryPayload, QueryType, TransactionFilterItem, MAX_TX_FILTERS}, + interchain_queries::types::{QueryPayload, QueryType, TransactionFilterItem}, proto_types::neutron::cron::ExecutionStage, sudo::msg::RequestPacketTimeoutHeight, - NeutronError, NeutronResult, + NeutronResult, }; use crate::bindings::dex::msg::DexMsg; @@ -298,22 +298,14 @@ impl NeutronMsg { connection_id, update_period, }, - QueryPayload::TX(transactions_filters) => { - if transactions_filters.len() > MAX_TX_FILTERS { - return Err(NeutronError::TooManyTransactionFilters { - max: MAX_TX_FILTERS, - }); - } else { - NeutronMsg::RegisterInterchainQuery { - query_type: QueryType::TX.into(), - keys: vec![], - transactions_filter: to_string(&transactions_filters) - .map_err(|e| StdError::generic_err(e.to_string()))?, - connection_id, - update_period, - } - } - } + QueryPayload::TX(transactions_filters) => NeutronMsg::RegisterInterchainQuery { + query_type: QueryType::TX.into(), + keys: vec![], + transactions_filter: to_string(&transactions_filters) + .map_err(|e| StdError::generic_err(e.to_string()))?, + connection_id, + update_period, + }, }) } @@ -333,16 +325,7 @@ impl NeutronMsg { new_update_period, new_transactions_filter: match new_transactions_filter { Some(filters) => { - if filters.len() > MAX_TX_FILTERS { - return Err(NeutronError::TooManyTransactionFilters { - max: MAX_TX_FILTERS, - }); - } else { - Some( - to_string(&filters) - .map_err(|e| StdError::generic_err(e.to_string()))?, - ) - } + Some(to_string(&filters).map_err(|e| StdError::generic_err(e.to_string()))?) } None => None, }, @@ -435,11 +418,16 @@ impl NeutronMsg { /// Basic helper to define burn tokens passed to TokenFactory module: /// * **denom** is a name of the denom; /// * **amount** is an amount of tokens to burn. - pub fn submit_burn_tokens(denom: impl Into, amount: Uint128) -> Self { + /// * **burn_from_address** is an address tokens will be burned from + pub fn submit_burn_tokens( + denom: impl Into, + amount: Uint128, + burn_from_address: Option, + ) -> Self { NeutronMsg::BurnTokens { denom: denom.into(), amount, - burn_from_address: String::new(), + burn_from_address: burn_from_address.unwrap_or_default(), } } diff --git a/packages/neutron-sdk/src/errors/error.rs b/packages/neutron-sdk/src/errors/error.rs index 700f5224..c94ad5cb 100644 --- a/packages/neutron-sdk/src/errors/error.rs +++ b/packages/neutron-sdk/src/errors/error.rs @@ -48,9 +48,6 @@ pub enum NeutronError { #[error("Integration tests mock is active")] IntegrationTestsMock {}, - #[error("Too many transaction filters, max allowed: {max:?}")] - TooManyTransactionFilters { max: usize }, - #[error("Can't deconstruct account denom balance key: {0}")] AccountDenomBalanceKeyDeconstructionError(String), } diff --git a/packages/neutron-sdk/src/interchain_queries/types.rs b/packages/neutron-sdk/src/interchain_queries/types.rs index f3d164b2..d4a0c3f2 100644 --- a/packages/neutron-sdk/src/interchain_queries/types.rs +++ b/packages/neutron-sdk/src/interchain_queries/types.rs @@ -59,8 +59,6 @@ impl Serialize for TransactionFilterValue { } } -pub const MAX_TX_FILTERS: usize = 32; - #[derive(Serialize, Deserialize, Debug)] pub struct TransactionFilterItem { pub field: String,