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 event timing #108

Merged
merged 4 commits into from
Nov 13, 2018
Merged

Fix event timing #108

merged 4 commits into from
Nov 13, 2018

Conversation

cckelly
Copy link
Contributor

@cckelly cckelly commented Nov 9, 2018

This PR makes transaction functions that rely on data from events before returning, to await on the event being fired rather than receiving the transaction receipt itself, causing a race condition on slower networks.

MarkGeeRomano
MarkGeeRomano previously approved these changes Nov 13, 2018
})
.on('error', log => reject(log))
})
address = address || contractAddress
Copy link

@mahjiang mahjiang Nov 13, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if address is falsy here, we should throw because it means something was up with the event

Copy link

@mahjiang mahjiang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🌋

@cckelly cckelly merged commit 62e2e83 into master Nov 13, 2018
@cckelly cckelly deleted the cck-fix-event-timing branch November 13, 2018 20:31
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

3 participants