From 9c872c38728c56a3f4efb2245a8c8cd6e887d03c Mon Sep 17 00:00:00 2001 From: Evan <0xIchigo@protonmail.com> Date: Sun, 22 Dec 2024 04:39:02 -0500 Subject: [PATCH] Formatting --- examples/send_smart_transaction_with_seeds.rs | 4 ++-- src/optimized_transaction.rs | 8 ++------ 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/examples/send_smart_transaction_with_seeds.rs b/examples/send_smart_transaction_with_seeds.rs index ffa7095..83d7eb8 100644 --- a/examples/send_smart_transaction_with_seeds.rs +++ b/examples/send_smart_transaction_with_seeds.rs @@ -15,8 +15,8 @@ async fn main() { let helius: Helius = Helius::new(api_key, cluster).unwrap(); // Convert your base58 private key to a seed - let keypair_base58 = "your_keypair_as_base58"; - let keypair_bytes = bs58::decode(keypair_base58).into_vec().unwrap(); + let keypair_base58: &str = "your_keypair_as_base58"; + let keypair_bytes: Vec = bs58::decode(keypair_base58).into_vec().unwrap(); // Create the recipient address let to_pubkey: Pubkey = Pubkey::from_str("recipient_address").unwrap(); diff --git a/src/optimized_transaction.rs b/src/optimized_transaction.rs index e00e383..850399e 100644 --- a/src/optimized_transaction.rs +++ b/src/optimized_transaction.rs @@ -611,9 +611,7 @@ impl Helius { let fee_payer_copy: Keypair = Keypair::from_bytes(&fee_payer.to_bytes()).unwrap(); let mut all_signers: Vec = vec![fee_payer_copy]; - all_signers.extend( - keypairs.into_iter().filter(|k| k.pubkey() != fee_payer.pubkey()) - ); + all_signers.extend(keypairs.into_iter().filter(|k| k.pubkey() != fee_payer.pubkey())); let mut tx: VersionedTransaction = VersionedTransaction { signatures: vec![Signature::default(); all_signers.len()], @@ -630,9 +628,7 @@ impl Helius { let mut tx: Transaction = Transaction::new_with_payer(&final_instructions, Some(&fee_payer.pubkey())); let mut signers: Vec<&Keypair> = vec![&fee_payer]; - signers.extend( - keypairs.iter().filter(|k| k.pubkey() != fee_payer.pubkey()) - ); + signers.extend(keypairs.iter().filter(|k| k.pubkey() != fee_payer.pubkey())); tx.sign(&signers, recent_blockhash);