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

(Fix) Doubled fired events #199

Merged
merged 6 commits into from Nov 23, 2018
Merged

(Fix) Doubled fired events #199

merged 6 commits into from Nov 23, 2018

Conversation

vbaranov
Copy link
Collaborator

Problem: If a dapp has multiple watchers of different smart-contracts events, and one of them is fired, dapp gets multiple firings from the wallet. The number of firings is equal the number of watchers, that dapp has.

Solution: Filter events to emit. If an event has been emitted before, do not emit the same event once more.

Related change in eth-json-rpc-filters dependency poanetwork/eth-json-rpc-filters@22d40ab
The behaviour could be tested with https://vbaranov.github.io/event-listener-dapp/:
The current release will fire 2 events.
The build from this PR will fire a single event.

@dennis00010011b could we add this test scenario with visiting the above link to our e2e tests?

@vbaranov vbaranov changed the title (Fix) doubled fired events (Fix) Doubled fired events Nov 21, 2018
@vbaranov vbaranov merged commit f577d69 into develop Nov 23, 2018
@ghost ghost removed the awaiting for review label Nov 23, 2018
@vbaranov vbaranov deleted the double-fired-events-fix branch November 23, 2018 06:53
@vbaranov vbaranov mentioned this pull request Nov 26, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants