Skip to content

Lesson14: Can I use the following code instead of Promise? #2522

Answered by othaime-en
f-hk asked this question in Q&A
Discussion options

You must be logged in to vote

Hey @f-hk you could totally use the code as it is above. We use the promise just to be safe incase the blockchain moves fast or slow i.e. the events gets emitted faster before we can "catch" it/ listen for it. But this is totally workable.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@f-hk
Comment options

Answer selected by f-hk
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants