Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
cjcobb23 committed Oct 30, 2024
1 parent 203e1c9 commit 6bd143a
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions contracts/interchain-token-service/src/contract/execute.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,18 +23,16 @@ pub enum Error {
FailedItsContractDeregistration(ChainNameRaw),
#[error("failed to execute message")]
FailedExecuteMessage,
#[error("failed to query nexus")]
NexusQueryError,
#[error("execution is currently disabled")]
ExecutionDisabled,
#[error("storage error")]
StorageError,
#[error("chain config for {0} already set")]
ChainConfigAlreadySet(ChainNameRaw),
#[error("invalid chain max uint")]
#[error("failed to load chain config for chain {0}")]
LoadChainConfig(ChainNameRaw),
#[error("failed to save chain config for chain {0}")]
SaveChainConfig(ChainNameRaw),
#[error("state error")]
State,
}

/// Executes an incoming ITS message.
Expand Down Expand Up @@ -146,11 +144,11 @@ pub fn deregister_its_contract(deps: DepsMut, chain: ChainNameRaw) -> Result<Res
}

pub fn disable_execution(deps: DepsMut) -> Result<Response, Error> {
killswitch::engage(deps.storage, Event::ExecutionDisabled).change_context(Error::StorageError)
killswitch::engage(deps.storage, Event::ExecutionDisabled).change_context(Error::State)
}

pub fn enable_execution(deps: DepsMut) -> Result<Response, Error> {
killswitch::disengage(deps.storage, Event::ExecutionEnabled).change_context(Error::StorageError)
killswitch::disengage(deps.storage, Event::ExecutionEnabled).change_context(Error::State)
}

pub fn set_chain_config(
Expand Down

0 comments on commit 6bd143a

Please sign in to comment.