diff --git a/contracts/interchain-token-service/src/contract/execute.rs b/contracts/interchain-token-service/src/contract/execute.rs index 2ff6d0e40..385d1b9cd 100644 --- a/contracts/interchain-token-service/src/contract/execute.rs +++ b/contracts/interchain-token-service/src/contract/execute.rs @@ -64,8 +64,7 @@ pub fn execute_message( message, } => { ensure!( - !is_chain_frozen(deps.storage, &destination_chain) - .change_context(Error::State)?, + !is_chain_frozen(deps.storage, &destination_chain).change_context(Error::State)?, Error::ChainFrozen(destination_chain) ); let destination_address = load_its_contract(deps.storage, &destination_chain) @@ -174,7 +173,6 @@ pub fn enable_execution(deps: DepsMut) -> Result { killswitch::disengage(deps.storage, Event::ExecutionEnabled).change_context(Error::State) } - pub fn set_chain_config( deps: DepsMut, chain: ChainNameRaw, @@ -201,7 +199,8 @@ mod tests { use router_api::{ChainNameRaw, CrossChainId}; use crate::contract::execute::{ - disable_execution, enable_execution, execute_message, freeze_chain, register_its_contract, unfreeze_chain, Error + disable_execution, enable_execution, execute_message, freeze_chain, register_its_contract, + unfreeze_chain, Error, }; use crate::state::{self, Config}; use crate::{HubMessage, Message}; diff --git a/contracts/interchain-token-service/src/state.rs b/contracts/interchain-token-service/src/state.rs index 2be922a3b..c855b7be3 100644 --- a/contracts/interchain-token-service/src/state.rs +++ b/contracts/interchain-token-service/src/state.rs @@ -51,7 +51,9 @@ pub fn may_load_chain_config( storage: &dyn Storage, chain: &ChainNameRaw, ) -> Result, Error> { - CHAIN_CONFIGS.may_load(storage, chain).change_context(Error::Storage) + CHAIN_CONFIGS + .may_load(storage, chain) + .change_context(Error::Storage) } pub fn save_chain_config( @@ -60,14 +62,16 @@ pub fn save_chain_config( max_uint: nonempty::Uint256, max_target_decimals: u8, ) -> Result<(), Error> { - CHAIN_CONFIGS.save( - storage, - chain, - &ChainConfig { - max_uint, - max_target_decimals, - }, - ).change_context(Error::Storage) + CHAIN_CONFIGS + .save( + storage, + chain, + &ChainConfig { + max_uint, + max_target_decimals, + }, + ) + .change_context(Error::Storage) } pub fn may_load_its_contract(