-
Notifications
You must be signed in to change notification settings - Fork 363
Conversation
CLA Assistant Lite All Contributors have signed the CLA. |
ESLint Summary View Full Report
Report generated by eslint-plus-action |
Pull Request Test Coverage Report for Build 1875604863
💛 - Coveralls |
.on('error', (err) => { | ||
throw err | ||
}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Then you probably don't need this at all.
Just replacing .once('transactionHash')
with .then(({ transactionHash }) => transactionHash)
will already make it wait for the final error (or success).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We're still investigating this as it takes 50 blocks before an error is emitted, so it's really time-consuming to debug. We're getting there though.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be faster on an L2 like Aurora (and free, too).
E2E Tests Passed ✅ |
We are going to split this into a second ticket as we have unveiled a deeper issue that is explained here. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So the fix, as I understood, is that it now correctly waits for the PromiEvent to finish, so that potential post-hash errors aren't ignored like before?
And it's still fast because you call onComplete as soon as the hash is there?
Exactly |
Noted the comment about the pending tx remaining there forever. I'll check that in that other ticket created for it Ok, so I tried this twice. The 2nd time I waited for a bit before submitting the cancelation (I wanted the tx to be indexed by the block explorer first, but it never was). I cancelled the tx in the MM extension and waited for over 30 mins and no error notification popped up at all. Both rejections, after more than 1 hour still show as "pending of indexation" in the block explorer although they are shown as executed in the MM extension, idk what is up with that I'll try one more time tomorrow to see if I get the 50 blocks error message in the console |
The 50 block error may only show in the developer environment. I'm not sure. The notification is shown when the error would appear in the console - it's triggered by the it. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Passing this one given the comment after my report. Also since the ticket #3531 was created to address the issue with the pending status I'll recheck everything when that ticket is ready |
What it solves
Resolves #3440
How this PR fixes it
Transactions now return the
transactionHash
from thereceipt
. After 50 blocks have been mined without successfuly execution, it throws triggering theonError
where the pending status is removed.onComplete
(for on-chain) transactions now occurs upon receiving the transaction hash as we save thetxHash
for the pending transaction. (Immediately executing transactions have notxId
and need to be proposed in order to save{ [txId]: txHash }
in the pending store).How to test it
1 Create a transaction (with low gas) and then cancel it via a (high gas) cancellation in MM.
2 After 15-30 mins, observe a notification about unsuccessful pend and a console error about the transaction not being mined within 50 blocks.
Screenshots