Duplicated transaction displayed in Batch details screen
Opened this issue · 1 comments
Summary of Bug
Hey people, looks like I found something weird in the testnet explorer.
I was double-checking the airdrop payments and figured out that some transactions were listed duplicated in the explorer website.
the block is this one: https://explorer.testnet.hermez.io/batch/6236
the duplicated transactions are: 0x02213bd36479cf0028428ca9f1441d3b37a026039c4c466af64e490f51763a0a2d and 0x02aa79146d7b1bd06803c6d911a538c7a83eacc219a80292d27dbcc9f39f44e677
I've already double-checked the API called by the front end, this is the URL being called to retrieve the transaction history: https://api.testnet.hermez.io/v1/transactions-history?batchNum=6236&order=DESC&limit=20
Accordingly to the API response, the transactions are not duplicated in the response, so I'm suspecting something is happening in the front-end logic.
Steps to Reproduce
Access this url: https://explorer.testnet.hermez.io/batch/6236
Check the transaction list, there will be two lines for the transactions 0x02213bd36479cf0028428ca9f1441d3b37a026039c4c466af64e490f51763a0a2d and 0x02aa79146d7b1bd06803c6d911a538c7a83eacc219a80292d27dbcc9f39f44e677
Browser information
- Browser:
Chrome
- Device/OS:
Desktop/Windows 10
Additional Information & Screenshots:
As an added information when there are more than 20 items in the same batch (20+ transactions batch), it fetch the following transactions using the following query https://api.testnet.hermez.io/v1/transactions-history?batchNum=6236&fromItem=34293&order=DESC&limit=20.
The fromItem
is calculated incorrectly, currently the last itemId
in the query https://api.testnet.hermez.io/v1/transactions-history?batchNum=6236&order=DESC&limit=20 is 34292
, but the batch explorer call withfromItem=34293
when it should be 34291
.
That's why in all the batches that has 20+ transactions, the (19 - 21) and (20 - 22) transactions are repeated