From 028930d144ef0366c086b46b728acaa727031a5a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Wei=C3=9Fer=20Hase?= <wei3erHase@protonmail.com> Date: Wed, 25 Sep 2024 16:57:01 +0200 Subject: [PATCH] fix: rollback format --- program/tests/functional.rs | 52 +++++++++++++++---------------------- 1 file changed, 21 insertions(+), 31 deletions(-) diff --git a/program/tests/functional.rs b/program/tests/functional.rs index 33a9dff..a1e667b 100644 --- a/program/tests/functional.rs +++ b/program/tests/functional.rs @@ -49,13 +49,12 @@ async fn test_token_vesting() { seeds, ) .unwrap()]; - let mut init_transaction = - Transaction::new_with_payer(&init_instruction, Some(&payer.pubkey())); + let mut init_transaction = Transaction::new_with_payer( + &init_instruction, + Some(&payer.pubkey()), + ); init_transaction.partial_sign(&[&payer], recent_blockhash); - banks_client - .process_transaction(init_transaction) - .await - .unwrap(); + banks_client.process_transaction(init_transaction).await.unwrap(); // Initialize the token accounts banks_client.process_transaction(mint_init_transaction( @@ -65,27 +64,22 @@ async fn test_token_vesting() { recent_blockhash, )) .await.unwrap(); - - banks_client - .process_transaction(create_token_account( + + banks_client.process_transaction(create_token_account( &payer, &mint, recent_blockhash, &source_token_account, &source_account.pubkey(), - )) - .await - .unwrap(); - banks_client - .process_transaction(create_token_account( + )).await.unwrap(); + banks_client.process_transaction( + create_token_account( &payer, &mint, recent_blockhash, &vesting_token_account, &vesting_account_key, - )) - .await - .unwrap(); + )).await.unwrap(); // Create and process the vesting transactions let setup_instructions = [mint_to( @@ -133,20 +127,14 @@ async fn test_token_vesting() { Transaction::new_with_payer(&setup_instructions, Some(&payer.pubkey())); setup_transaction.partial_sign(&[&payer, &mint_authority], recent_blockhash); - banks_client - .process_transaction(setup_transaction) - .await - .unwrap(); + banks_client.process_transaction(setup_transaction).await.unwrap(); // Process transaction on test network let mut test_transaction = Transaction::new_with_payer(&test_instructions, Some(&payer.pubkey())); test_transaction.partial_sign(&[&payer, &source_account], recent_blockhash); - banks_client - .process_transaction(test_transaction) - .await - .unwrap(); + banks_client.process_transaction(test_transaction).await.unwrap(); } #[tokio::test] @@ -195,8 +183,10 @@ async fn test_token_unlocking() { seeds, ) .unwrap()]; - let mut init_transaction = - Transaction::new_with_payer(&init_instruction, Some(&payer.pubkey())); + let mut init_transaction = Transaction::new_with_payer( + &init_instruction, + Some(&payer.pubkey()), + ); init_transaction.partial_sign(&[&payer], recent_blockhash); banks_client .process_transaction(init_transaction) @@ -214,8 +204,8 @@ async fn test_token_unlocking() { .await .unwrap(); - banks_client - .process_transaction(create_token_account( + banks_client.process_transaction( + create_token_account( &payer, &mint, recent_blockhash, @@ -224,8 +214,8 @@ async fn test_token_unlocking() { )) .await .unwrap(); - banks_client - .process_transaction(create_token_account( + banks_client.process_transaction( + create_token_account( &payer, &mint, recent_blockhash,