feat: upgrade to v0.6.6 with improved tip transfer logic
This commit is contained in:
@@ -54,7 +54,7 @@ pub async fn build_transaction(
|
||||
instructions.extend(business_instructions);
|
||||
|
||||
// Add tip transfer instruction
|
||||
if with_tip {
|
||||
if with_tip && tip_amount > 0.0 {
|
||||
instructions.push(transfer(
|
||||
&payer.pubkey(),
|
||||
tip_account,
|
||||
|
||||
@@ -110,7 +110,7 @@ async fn parallel_execute(
|
||||
|
||||
let tip_account_str = swqos_client.get_tip_account()?;
|
||||
let tip_account = Arc::new(Pubkey::from_str(&tip_account_str).unwrap_or_default());
|
||||
let tip_amount = priority_fee.buy_tip_fees[i];
|
||||
let tip_amount = if with_tip { priority_fee.buy_tip_fees[i] } else { 0.0 };
|
||||
|
||||
let transaction = build_transaction(
|
||||
payer,
|
||||
|
||||
Reference in New Issue
Block a user