Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fetchEvents returns events in different order than local blockchain #859

Closed
mitschabaude opened this issue Apr 13, 2023 · 2 comments · Fixed by #1460
Closed

fetchEvents returns events in different order than local blockchain #859

mitschabaude opened this issue Apr 13, 2023 · 2 comments · Fixed by #1460
Assignees
Labels
bug Something isn't working

Comments

@mitschabaude
Copy link
Member

mitschabaude commented Apr 13, 2023

Reported by @mitschabaude

@MartinMinkov I assume this is just because we don't do fetchedEvents.reverse() inside fetchEvents(), as we do for actions?

@mitschabaude mitschabaude added the bug Something isn't working label Apr 13, 2023
@MartinMinkov
Copy link
Contributor

Yup, a .reverse() inside fetchEvents() would fix this! Although, I would question whether fetching events in the order they happened is the most common use case. Is there a case for changing LocalBlockchain to return the latest events instead? I can image use cases like a UI listening for events; you would probably be most interested in the latest events dispatched rather than fetching events and looking at the end for the ones you want. WDYT?

@mitschabaude
Copy link
Member Author

Good point @MartinMinkov!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants