-
Notifications
You must be signed in to change notification settings - Fork 440
Description
Describe the bug and the steps to reproduce it
🐛 Bug Description
When using the search parameter with the getTokens API, the returned token list is incomplete. For example, when searching for "USDC", the results do not include the standard USDC token (address: 0x833589fcd6edb6e08f4c7c32d4f71b54bda02913), which is returned normally when no search parameter is provided.
🔍 Steps to Reproduce
Call the getTokens API with search: "USDC".
Observe the returned token list.
Call the getTokens API again without the search parameter.
Compare both results to find that the standard USDC token is missing from the search results.
Actual Request Example (JSON-RPC):
{ "id": 1, "jsonrpc": "2.0", "method": "cdp_listSwapAssets", "params": [ { "limit": "50", "page": "1", "search": "USDC" } ] }
Actual Response:
{ "id": 1, "jsonrpc": "2.0", "result": [ { "address": "0x90850a54004f9fcfbd0175a57747a39e231ea571", "chainId": 8453, "decimals": 18, "image": "", "name": "Stable AMM - USDbC/axlUSDC", "symbol": "sAMM-USDbC/axlUSDC" }, { "address": "0xeb466342c4d449bc9f53a865d5cb90586f405215", "chainId": 8453, "decimals": 6, "image": "", "name": "Axelar Wrapped USDC", "symbol": "axlUSDC" } ] }
Expected Response: Should include the standard USDC token:
{ "address": "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913", "chainId": 8453, "decimals": 6, "image": "https://d3r81g40ycuhqg.cloudfront.net/wallet/wais/44/2b/442b80bd16af0c0d9b22e03a16753823fe826e5bfd457292b55fa0ba8c1ba213-ZWUzYjJmZGUtMDYxNy00NDcyLTg0NjQtMWI4OGEwYjBiODE2", "name": "USDC", "symbol": "USDC" }
💻 Environment Information
Library/API: @coinbase/onchainkit getTokens API
Network: Base Mainnet (chainId: 8453)
📝 Additional Context
This issue may prevent developers from obtaining complete relevant token lists through the search functionality, affecting the normal operation of application features. The search algorithm or backend data indexing might not be covering all tokens that should match the search criteria.
We hope this issue can be confirmed and resolved promptly. Thank you for the maintainers' hard work!
What's the expected behavior?
The search results for "USDC" should include ALL tokens that match the search criteria in token name, symbol, or address, particularly the standard USDC token that exactly matches the search term.
What version of the libraries are you using?
"@coinbase/onchainkit": "^1.1.2",