Lesson 10: handleSuccess = async (tx) where does tx come from? #1473
-
In lotteryEntrance.js component we have button to enter raffle and it has onSuccess handler like below
and then this handleSuccess calls await.tx(1) like
what I find missing is info how tx get into this function. It should somehow come from enterRaffle handler but there is no mention of it so looks like magic? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
@adriadrop the it is equivalent to this: onSuccess: (tx) {
} here instead of |
Beta Was this translation helpful? Give feedback.
-
Came to the ask this question. Thank you for the question @adriadrop and @alymurtazamemon like always for replying. |
Beta Was this translation helpful? Give feedback.
@adriadrop the
onSuccess
will return the response to its callback that is how you can getting it insidehandleSuccess
function.it is equivalent to this:
here instead of
tx
you can name it whatever you want.