Skip to content

Commit

Permalink
slight addition
Browse files Browse the repository at this point in the history
  • Loading branch information
taiki1frsh committed Aug 21, 2023
1 parent 9d6a4ba commit f30105b
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 5 deletions.
3 changes: 2 additions & 1 deletion contracts/ibc-denom-resolver/tests/helpers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,8 @@ pub fn setup() -> OwnedDeps<MockStorage, MockApi, MockQuerier> {
// Cosmos Hub
];
let instantiate_msg = InstantiateMsg {
denom: String::from("uguu"), // random leteral
input_denom: String::from("ibc/uguu"), // random leteral
output_denom: String::from("uguu"), // random leteral
first_forward_contract: String::from("ununifi14hj2tavq8fpesdwxxcu44rty3hh90vhujrvcmstl4zr3txmfvw9sm5z28e"), // random address
routes: routes,
timeout: Duration::from_secs(DEFAULT_TIMEOUT),
Expand Down
4 changes: 2 additions & 2 deletions contracts/ibc-denom-resolver/tests/test_swap.rs
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ pub fn swap() {
let swap_msg = SwapMsg {
receivers: receivers.clone(),
};
let info = mock_info(sender, &[Coin{denom: String::from("uguu"), amount: Uint128::from(100 as u32)}]);
let info = mock_info(sender, &[Coin{denom: String::from("ibc/uguu"), amount: Uint128::from(100 as u32)}]);

let res = execute_swap(
deps.as_mut(),
Expand All @@ -98,7 +98,7 @@ pub fn swap() {
let config: Config = th_query(deps.as_ref(), QueryMsg::Config {});
let send_msg = SubMsg::new(CosmosMsg::Bank(BankMsg::Send {
to_address: config.treasury.to_string(),
amount: vec![Coin::new(2 as u128, config.denom.clone())],
amount: vec![Coin::new(2 as u128, config.input_denom.clone())],
}));
assert_eq!(res.messages[0], send_msg)
}
Expand Down
2 changes: 1 addition & 1 deletion contracts/ibc-denom-resolver/tests/test_update_config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ fn initialized_state() {

let config: Config = th_query(deps.as_ref(), QueryMsg::Config {});
assert_eq!(Decimal::zero(), config.fee.commission_rate);
assert_eq!("uguu", config.denom);
assert_eq!("ibc/uguu", config.input_denom);
}

#[test]
Expand Down
2 changes: 1 addition & 1 deletion contracts/packet-forward/tests/test_forward.rs
Original file line number Diff line number Diff line change
Expand Up @@ -79,12 +79,12 @@ fn test_execute_forward() {
)
.unwrap();

println!("{:?}", res);
assert_eq!(2, res.messages.len());

let sub_msg_id = SUB_MSG_ID.load(deps.as_ref().storage).unwrap();
assert_eq!(2, sub_msg_id);
let request_id = REQUEST_ID.load(deps.as_ref().storage).unwrap();
assert_eq!(2, request_id);
}

}

0 comments on commit f30105b

Please sign in to comment.