Skip to content

Commit

Permalink
fix e2e test
Browse files Browse the repository at this point in the history
  • Loading branch information
yito88 committed Dec 27, 2023
1 parent c6fb627 commit ec2488d
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions tests/src/e2e/ibc_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ fn run_ledger_ibc() -> Result<()> {
&port_id_b,
&channel_id_b,
)?;
check_shielded_balances(&port_id_b, &channel_id_b, &test_b)?;
check_shielded_balances(&port_id_b, &channel_id_b, &test_a, &test_b)?;

// Skip tests for closing a channel and timeout_on_close since the transfer
// channel cannot be closed
Expand Down Expand Up @@ -1024,6 +1024,8 @@ fn shielded_transfer(
// It will send 10 BTC from Chain A to PA(B) on Chain B
let rpc_b = get_actor_rpc(test_b, &Who::Validator(0));
let output_folder = test_b.test_dir.path().to_string_lossy();
// PA(B) on Chain B will receive BTC on chain A
let token_addr = find_address(test_a, BTC)?;
let amount = Amount::native_whole(10).to_string_native();
let args = [
"ibc-gen-shielded",
Expand All @@ -1032,7 +1034,7 @@ fn shielded_transfer(
"--target",
AB_PAYMENT_ADDRESS,
"--token",
BTC,
&token_addr.to_string(),
"--amount",
&amount,
"--port-id",
Expand Down Expand Up @@ -1526,16 +1528,19 @@ fn check_balances_after_back(
fn check_shielded_balances(
dest_port_id: &PortId,
dest_channel_id: &ChannelId,
test_a: &Test,
test_b: &Test,
) -> Result<()> {
// Check the balance on Chain B
let rpc_b = get_actor_rpc(test_b, &Who::Validator(0));
// PA(B) on Chain B has received BTC on chain A
let token_addr = find_address(test_a, BTC)?.to_string();
let query_args = vec![
"balance",
"--owner",
AB_VIEWING_KEY,
"--token",
BTC,
&token_addr,
"--no-conversions",
"--node",
&rpc_b,
Expand Down

0 comments on commit ec2488d

Please sign in to comment.