
Solana Witches
Non-Custodial
Verified Error Solution
How to Fix "Cannot Close Account: Non-Zero Token Balance"
Solana SPL Token Program strictly forbids closing accounts with any balance remaining, even if it is 0.000001 dust.
Dissolve $SOL Container
1-Click Non-Custodial ATA Reclamation
Rent Locked
+0.00204 SOL
Target Asset:$SOL
Status:Awaiting wallet connection
Reclaim Value:~0.00203928 SOL ($0.35 USD)
Atomic batch execution • 0 escrow • Lamports return directly to fee payer
100% Non-Custodial
0 Escrow (Direct to Wallet)
SPL Program Certified
Root Cause Analysis
The CloseAccount instruction checks that account.amount === 0. If non-zero, it throws error 0x1.
Step-by-Step Resolution
- Check if the remaining tokens are valuable or spam dust.
- If dust, dispatch createBurnInstruction to incinerate the remaining tokens.
- Execute createCloseAccountInstruction to retrieve the 0.002039 SOL deposit.
On-Chain Instruction Reference
import { createBurnInstruction, createCloseAccountInstruction, TOKEN_PROGRAM_ID } from "@solana/spl-token";
// 1. Burn dust balance
const burnIx = createBurnInstruction(
userTokenAccount,
mint,
userWallet,
dustAmount
);
// 2. Close account and reclaim SOL
const closeIx = createCloseAccountInstruction(
userTokenAccount,
userWallet,
userWallet
);Technical FAQ
Will burning dust tokens cost me money?
No! The dust is usually worth $0.0001, while closing the account returns 0.002039 SOL ($0.35 USD), giving you an immediate net positive return.