Skip to content

Commit

Permalink
format imports and remove unneeded clones
Browse files Browse the repository at this point in the history
  • Loading branch information
NotJeremyLiu committed Oct 16, 2023
1 parent d854ec5 commit b5d0e2e
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 10 deletions.
11 changes: 6 additions & 5 deletions contracts/entry-point/src/contract.rs
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
use crate::error::ContractError::ReplyIdError;
use crate::execute::execute_axelar_swap_and_action;
use crate::reply::{handle_swap_and_action_request, SWAP_AND_ACTION_REQUEST_REPLY_ID};
use crate::{
error::{ContractError, ContractResult},
execute::{execute_post_swap_action, execute_swap_and_action, execute_user_swap},
execute::{
execute_axelar_swap_and_action, execute_post_swap_action, execute_swap_and_action,
execute_user_swap,
},
query::{query_ibc_transfer_adapter_contract, query_swap_venue_adapter_contract},
reply::{handle_swap_and_action_request, SWAP_AND_ACTION_REQUEST_REPLY_ID},
state::{BLOCKED_CONTRACT_ADDRESSES, IBC_TRANSFER_CONTRACT_ADDRESS, SWAP_VENUE_MAP},
};
use cosmwasm_std::{
Expand Down Expand Up @@ -149,7 +150,7 @@ pub fn execute(
pub fn reply(deps: DepsMut, _env: Env, msg: Reply) -> Result<Response, ContractError> {
match msg.id {
SWAP_AND_ACTION_REQUEST_REPLY_ID => handle_swap_and_action_request(deps, _env, msg),
_ => Err(ReplyIdError(msg.id)),
_ => Err(ContractError::ReplyIdError(msg.id)),
}
}

Expand Down
10 changes: 6 additions & 4 deletions contracts/entry-point/src/execute.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
use crate::reply::{SwapActionTempStorage, SWAP_AND_ACTION_REQUEST_REPLY_ID};
use crate::state::SWAP_AND_ACTION_REQUEST_TEMP_STORAGE;
use crate::{
error::{ContractError, ContractResult},
state::{BLOCKED_CONTRACT_ADDRESSES, IBC_TRANSFER_CONTRACT_ADDRESS, SWAP_VENUE_MAP},
reply::{SwapActionTempStorage, SWAP_AND_ACTION_REQUEST_REPLY_ID},
state::{
BLOCKED_CONTRACT_ADDRESSES, IBC_TRANSFER_CONTRACT_ADDRESS,
SWAP_AND_ACTION_REQUEST_TEMP_STORAGE, SWAP_VENUE_MAP,
},
};
use cosmwasm_std::{
to_binary, Addr, BankMsg, Coin, CosmosMsg, DepsMut, Env, MessageInfo, Response, SubMsg,
Expand Down Expand Up @@ -175,7 +177,7 @@ pub fn execute_axelar_swap_and_action(
post_swap_action,
affiliates,
})?,
funds: info.funds.clone(),
funds: info.funds,
}),
SWAP_AND_ACTION_REQUEST_REPLY_ID,
);
Expand Down
2 changes: 1 addition & 1 deletion contracts/entry-point/tests/test_error_handling.rs
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ pub fn test_execute_swap_and_action(params: Params) {
let res = skip_api_entry_point::contract::execute(
deps.as_mut(),
env,
info.clone(),
info,
ExecuteMsg::AxelarSwapAndAction {
user_swap: params.user_swap,
min_coin: params.min_coin,
Expand Down

0 comments on commit b5d0e2e

Please sign in to comment.