diff --git a/test-programs/compressed-token-test/tests/test.rs b/test-programs/compressed-token-test/tests/test.rs index a4c41a75f..4cb33c947 100644 --- a/test-programs/compressed-token-test/tests/test.rs +++ b/test-programs/compressed-token-test/tests/test.rs @@ -4112,7 +4112,10 @@ async fn test_failing_thaw() { /// 6: invalid token recipient /// 7. invalid token pool pda (in struct) /// 8. invalid token pool pda (in remaining accounts) +<<<<<<< HEAD /// 8.1. invalid derived token pool pda (in struct and remaining accounts) +======= +>>>>>>> 39262bad7 (feat: multiple `tokenPoolPda` accounts (#1407)) /// 9. FailedToDecompress pass multiple correct token accounts with insufficient balance /// 10. invalid token pool pda from invalid mint (in struct) /// 11. invalid token pool pda from invalid mint (in remaining accounts) @@ -4391,6 +4394,7 @@ async fn test_failing_decompression() { ) .await .unwrap(); +<<<<<<< HEAD } // Test 8.1: invalid derived token pool pda (in struct and remaining accounts) { let token_account_keypair_2 = Keypair::new(); @@ -4450,10 +4454,22 @@ async fn test_failing_decompression() { ) .await .unwrap(); +======= +>>>>>>> 39262bad7 (feat: multiple `tokenPoolPda` accounts (#1407)) } // Test 9: FailedToDecompress pass multiple correct token accounts with insufficient balance { let token_pool = get_token_pool_pda_with_bump(&mint, 3); +<<<<<<< HEAD +======= + let mut account = context.get_account(token_pool).await.unwrap().unwrap(); + println!("token pool account {:?}", token_pool); + let amount = + TokenAccount::try_deserialize_unchecked(&mut &*account.data.as_mut_slice()) + .unwrap() + .amount; + println!("{:?}", amount); +>>>>>>> 39262bad7 (feat: multiple `tokenPoolPda` accounts (#1407)) failing_compress_decompress( &sender, &mut context, diff --git a/test-utils/src/spl.rs b/test-utils/src/spl.rs index 9dd023cc9..02d8e9db6 100644 --- a/test-utils/src/spl.rs +++ b/test-utils/src/spl.rs @@ -734,7 +734,11 @@ pub async fn decompress_test>( transaction_params: Option, is_token_22: bool, token_pool_bump: u8, +<<<<<<< HEAD additional_pool_accounts: Option>, +======= + additonal_pool_accounts: Option>, +>>>>>>> 39262bad7 (feat: multiple `tokenPoolPda` accounts (#1407)) ) { let max_amount: u64 = input_compressed_accounts .iter() @@ -799,7 +803,11 @@ pub async fn decompress_test>( None, None, is_token_22, +<<<<<<< HEAD additional_pool_accounts +======= + additonal_pool_accounts +>>>>>>> 39262bad7 (feat: multiple `tokenPoolPda` accounts (#1407)) .clone() .unwrap_or_default() .as_slice(), @@ -829,7 +837,11 @@ pub async fn decompress_test>( .unwrap() .amount, ]; +<<<<<<< HEAD for additional_pool_account in additional_pool_accounts +======= + for additional_pool_account in additonal_pool_accounts +>>>>>>> 39262bad7 (feat: multiple `tokenPoolPda` accounts (#1407)) .clone() .unwrap_or_default() .as_slice() @@ -899,7 +911,11 @@ pub async fn decompress_test>( token_pool_pre_balances[0].saturating_sub(amount) ); let mut amount = amount - token_pool_pre_balances[0]; +<<<<<<< HEAD for (i, additional_account) in additional_pool_accounts +======= + for (i, additional_account) in additonal_pool_accounts +>>>>>>> 39262bad7 (feat: multiple `tokenPoolPda` accounts (#1407)) .unwrap_or_default() .iter() .enumerate() @@ -1010,7 +1026,11 @@ pub async fn compress_test>( transaction_params: Option, is_token_22: bool, token_pool_bump: u8, +<<<<<<< HEAD additional_pool_accounts: Option>, +======= + additonal_pool_accounts: Option>, +>>>>>>> 39262bad7 (feat: multiple `tokenPoolPda` accounts (#1407)) ) { let output_compressed_account = TokenTransferOutputData { amount, @@ -1038,7 +1058,11 @@ pub async fn compress_test>( None, None, is_token_22, +<<<<<<< HEAD additional_pool_accounts.unwrap_or_default().as_slice(), +======= + additonal_pool_accounts.unwrap_or_default().as_slice(), +>>>>>>> 39262bad7 (feat: multiple `tokenPoolPda` accounts (#1407)) ) .unwrap(); let output_merkle_tree_pubkeys = vec![*output_merkle_tree_pubkey]; @@ -1713,7 +1737,11 @@ pub async fn create_burn_test_instruction>( mode: BurnInstructionMode, is_token_22: bool, token_pool_bump: u8, +<<<<<<< HEAD additional_pool_accounts: Option>, +======= + additonal_pool_accounts: Option>, +>>>>>>> 39262bad7 (feat: multiple `tokenPoolPda` accounts (#1407)) ) -> (Vec<[u8; 32]>, Vec, Pubkey, u64, Instruction) { let input_compressed_account_hashes = input_compressed_accounts .iter() @@ -1770,7 +1798,11 @@ pub async fn create_burn_test_instruction>( burn_amount, is_token_22, token_pool_bump, +<<<<<<< HEAD additional_pool_accounts: additional_pool_accounts.unwrap_or_default(), +======= + additonal_pool_accounts: additonal_pool_accounts.unwrap_or_default(), +>>>>>>> 39262bad7 (feat: multiple `tokenPoolPda` accounts (#1407)) }; let input_amount_sum = input_compressed_accounts .iter()