Closed joepegler closed 6 months ago
what does success flag indicate? and if the user is getting the transactionHash why is the success flag false?
what does success flag indicate? and if the user is getting the transactionHash why is the success flag false?
The success flag indicated if the user operation has failed or if it is successful. The transaction hash is returned whenever, even if user op fails or not, the user operation execution will not revert the transaction, that is why we need to check the flag for success not the transaction hash.
We're getting lots of reports from v4 users who are receiving a tx hash and assuming that their code is working, but they are also receiving "success" === "false" from the userOp hash without realising.
In our docs we need to better inform devs to check that success == 'true' in the responseafter they've sent a transaction. For example here, and the rest of the tutorials
See the test here as an example of how the check can be performed
We will add this check in our tests too more thoroughly so that readers of the tests notice how to measure the success of a tx.
TLDR:
Change
for
throughout the docs where appropriate