Describe the bug
When switching browser tabs useToken refetches token metadata.
Data fetching is done through SWR library.
tokenAddress briefly becomes null when switching tabs, useToken passes tokenAddress as a dependency, so when tokenAddress changes value SWR executes RPC call once again
To Reproduce
Steps to reproduce the behavior:
- Go to swap form on '/'
- Click Select token and select any item
- Jump to any other tab in your browser
- Wait a second and go back
- See in network tab that new request is made
Expected behavior
Token metadata is fetched once when token is selected.
Screenshots

Desktop (please complete the following information):
- OS: Linux
- Browser google-chrome-stable
- Version 131.0.6778.264
Describe the bug
When switching browser tabs useToken refetches token metadata.
Data fetching is done through SWR library.
tokenAddress briefly becomes null when switching tabs, useToken passes tokenAddress as a dependency, so when tokenAddress changes value SWR executes RPC call once again
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Token metadata is fetched once when token is selected.
Screenshots

Desktop (please complete the following information):