Skip to content

Commit

Permalink
fix: rollback format
Browse files Browse the repository at this point in the history
  • Loading branch information
wei3erHase committed Sep 25, 2024
1 parent ecb70cc commit c88980b
Showing 1 changed file with 7 additions and 22 deletions.
29 changes: 7 additions & 22 deletions program/tests/functional.rs
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,7 @@ async fn test_token_vesting() {
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(
Expand All @@ -66,26 +63,20 @@ async fn test_token_vesting() {
))
.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(
Expand Down Expand Up @@ -133,20 +124,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]
Expand Down

0 comments on commit c88980b

Please sign in to comment.