Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
fish-sammy committed Nov 4, 2024
2 parents 83ade73 + afe253d commit 1d3b5d5
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
4 changes: 2 additions & 2 deletions contracts/interchain-token-service/src/contract/execute.rs
Original file line number Diff line number Diff line change
Expand Up @@ -507,10 +507,10 @@ fn save_token_instances(

if let Some(TokenConfig { origin_chain, .. }) = token_config {
ensure_matching_original_deployment(
storage,
origin_chain,
source_chain,
token_id,
storage,
source_token_decimals,
)?;
} else {
Expand All @@ -529,10 +529,10 @@ fn save_token_instances(
}

fn ensure_matching_original_deployment(
storage: &dyn Storage,
origin_chain: ChainNameRaw,
source_chain: &ChainNameRaw,
token_id: TokenId,
storage: &mut dyn Storage,
source_token_decimals: Option<u8>,
) -> Result<(), Error> {
ensure!(
Expand Down
2 changes: 2 additions & 0 deletions contracts/interchain-token-service/src/state.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ pub enum Error {
ItsContractAlreadyRegistered(ChainNameRaw),
#[error("chain not found {0}")]
ChainNotFound(ChainNameRaw),
#[error("chain config for chain {0} not found")]
ChainConfigNotFound(ChainNameRaw),
// This is a generic error to use when cw_storage_plus returns an error that is unexpected and
// should never happen, such as an error encountered when saving data.
#[error("storage error")]
Expand Down
2 changes: 1 addition & 1 deletion contracts/interchain-token-service/tests/execute.rs
Original file line number Diff line number Diff line change
Expand Up @@ -267,8 +267,8 @@ fn execute_message_deploy_interchain_token_should_translate_decimals_when_max_ui
mut deps,
TestMessage {
router_message,
source_its_chain,
source_its_contract,
source_its_chain,
destination_its_chain,
..
},
Expand Down

0 comments on commit 1d3b5d5

Please sign in to comment.