-
Notifications
You must be signed in to change notification settings - Fork 0
Description
Your issue will be reviewed by a maintainer and labeled for further action.
To complete your request, follow the bot-actions to report this on the support E-mail box and follow the outlined steps. Alternatively, you can report this issue on the official web page to an agent for assistance.
@IAliceBobI
Issue Description
Issue Description
When querying the balance of an ATA (Associated Token Account) that does not exist, the response is very slow.
Reproduction Steps
- Use a new wallet address that has never held USDC
- Query the USDC ATA balance for this address
- Observe significant delay before response
Example Scenario
// Example code (pseudo-code)
const usdcMint = new PublicKey("EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v"); // USDC mint
const wallet = new Wallet("new-wallet-address-without-usdc-ata");// This query is slow when ATA doesn't exist
const balance = await connection.getTokenAccountBalance(
getAssociatedTokenAddressSync(usdcMint, wallet.publicKey)
);Expected Behavior
- Should return quickly with a "account not found" error or null balance
- Similar to how mainnet-beta handles non-existent accounts
Actual Behavior
- Significant delay (can take several seconds)
- Makes balance checking for new wallets very slow
Environment
- Surfpool version: [Please fill in]
- OS: [Please fill in]
Additional Context
This affects:
- Balance checking for new users
- Batch balance queries where some accounts don't exist
- Token portfolio displays for new wallets
The issue is particularly noticeable when:
- Querying multiple token balances for a new wallet
- Building portfolio displays where most ATAs don't exist yet