feat: upgrade to v0.6.12
This commit is contained in:
@@ -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 };
|
||||
|
||||
Reference in New Issue
Block a user