feat: add close_mint_token_ata support for sell transactions

This commit is contained in:
ysq
2025-10-26 23:55:28 +08:00
parent 2bf43fc99f
commit 11383a0492
10 changed files with 66 additions and 7 deletions
+1 -1
View File
@@ -241,7 +241,7 @@ impl InstructionBuilder for PumpFunInstructionBuilder {
));
// Optional: Close token account
if protocol_params.close_token_account_when_sell.unwrap_or(false) {
if protocol_params.close_token_account_when_sell.unwrap_or(false) || params.close_input_mint_ata {
instructions.push(close_account(
&crate::constants::TOKEN_PROGRAM,
&user_token_account,