Skip to content

Commit 58ef975

Browse files
committed
adapted test
1 parent 910d7bd commit 58ef975

File tree

1 file changed

+5
-8
lines changed

1 file changed

+5
-8
lines changed

program-tests/sdk-token-test/tests/test_deposit.rs

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -321,12 +321,11 @@ async fn update_deposit_compressed_account(
321321
println!("packed_accounts {:?}", packed_accounts.state_trees);
322322
// TODO: investigate why packed_tree_infos seem to be out of order
323323
// Create token meta from compressed account
324-
let mut tree_info = packed_accounts
324+
let tree_info = packed_accounts
325325
.state_trees
326326
.as_ref()
327327
.unwrap()
328-
.packed_tree_infos[2];
329-
tree_info.leaf_index = 3;
328+
.packed_tree_infos[1];
330329
let depositing_token_metas = vec![TokenAccountMeta {
331330
amount: deposit_ctoken_account.token.amount,
332331
delegate_index: None,
@@ -335,12 +334,11 @@ async fn update_deposit_compressed_account(
335334
tlv: None,
336335
}];
337336
println!("depositing_token_metas {:?}", depositing_token_metas);
338-
let mut tree_info = packed_accounts
337+
let tree_info = packed_accounts
339338
.state_trees
340339
.as_ref()
341340
.unwrap()
342-
.packed_tree_infos[1];
343-
tree_info.leaf_index = 2;
341+
.packed_tree_infos[2];
344342
let escrowed_token_meta = TokenAccountMeta {
345343
amount: escrow_ctoken_account.token.amount,
346344
delegate_index: None,
@@ -355,12 +353,11 @@ async fn update_deposit_compressed_account(
355353
let system_accounts_start_offset = system_accounts_start_offset as u8;
356354
println!("remaining_accounts {:?}", remaining_accounts);
357355

358-
let mut tree_info = packed_accounts
356+
let tree_info = packed_accounts
359357
.state_trees
360358
.as_ref()
361359
.unwrap()
362360
.packed_tree_infos[0];
363-
tree_info.leaf_index = 1;
364361
let account_meta = CompressedAccountMeta {
365362
tree_info,
366363
address: escrow_pda.address.unwrap(),

0 commit comments

Comments
 (0)