Bug Description
The TokenSelector component does not distinguish between a failed token-list request and a successfully loaded empty token list.
In components/TokenSelector.tsx, fetch errors are caught and the token list is replaced with an empty array:
catch (error) {
console.error("Error fetching tokens:", error);
setTokens([]);
}
Because of this, users may see an empty token-list state without knowing that the request failed. The manual token-address input should remain available, and the UI should show a clear error message with an option to retry.
A successful request returning HTTP 304 is expected behavior and is not the bug. The bug occurs when the token-list request fails.
Steps to Reproduce
- Open the Create Oracle page.
- Open DevTools and go to the Network tab.
- Enable "Disable cache".
- Right-click the
ethereum-tokens.json request and select "Block request URL".
- Reload the Create Oracle page.
- Open the token selector.
- Observe the token-list state and the browser Console.
Logs and Screenshots
The normal request succeeds with:
ethereum-tokens.json 304 fetch
HTTP 304 is expected and means the browser reused its cached response.
When the request is blocked or the browser is offline, the request fails with a browser network error, such as:
net::ERR_BLOCKED_BY_CLIENT
The current code logs the failure:
Error fetching tokens: ...
Environment Details
- OS: Windows
- Browser: Google Chrome
- Application: OrbOracle EVM Frontend
- Page: Create Oracle
- Network: Ethereum network supported by the token list
- Reproduction method: Blocked token-list request / Offline mode
Impact
Low - Minor inconvenience
Code of Conduct
Bug Description
The TokenSelector component does not distinguish between a failed token-list request and a successfully loaded empty token list.
In
components/TokenSelector.tsx, fetch errors are caught and the token list is replaced with an empty array:Because of this, users may see an empty token-list state without knowing that the request failed. The manual token-address input should remain available, and the UI should show a clear error message with an option to retry.
A successful request returning HTTP 304 is expected behavior and is not the bug. The bug occurs when the token-list request fails.
Steps to Reproduce
ethereum-tokens.jsonrequest and select "Block request URL".Logs and Screenshots
The normal request succeeds with:
HTTP 304 is expected and means the browser reused its cached response.
When the request is blocked or the browser is offline, the request fails with a browser network error, such as:
The current code logs the failure:
Environment Details
Impact
Low - Minor inconvenience
Code of Conduct