feat: upgrade to v0.6.12

This commit is contained in:
ysq
2025-09-14 23:28:45 +08:00
parent 206baca025
commit 1192730e22
4 changed files with 15 additions and 15 deletions
+9 -9
View File
@@ -42,6 +42,15 @@ pub async fn build_transaction(
}
}
// Add tip transfer instruction
if with_tip && tip_amount > 0.0 {
instructions.push(transfer(
&payer.pubkey(),
tip_account,
sol_str_to_lamports(tip_amount.to_string().as_str()).unwrap_or(0),
));
}
// Add compute budget instructions
instructions.extend(compute_budget_instructions(
priority_fee,
@@ -53,15 +62,6 @@ pub async fn build_transaction(
// Add business instructions
instructions.extend(business_instructions);
// Add tip transfer instruction
if with_tip && tip_amount > 0.0 {
instructions.push(transfer(
&payer.pubkey(),
tip_account,
sol_str_to_lamports(tip_amount.to_string().as_str()).unwrap_or(0),
));
}
// Get blockhash for transaction
let blockhash =
if is_buy { get_transaction_blockhash(recent_blockhash) } else { recent_blockhash };