-
Notifications
You must be signed in to change notification settings - Fork 360
Fix: use recommended nonce in the nonce warning #3530
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 1877151044
💛 - Coveralls |
iamacook
left a comment
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.
There's a failing test that needs looking at.
|
E2E Tests Failed Failed tests:
|
DiogoSoaress
left a comment
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.
The fix makes total sense. 👍
There is a failing test however.
usame-algan
left a comment
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.
Looking good!
usame-algan
left a comment
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.
🚀
|
Issue: In this snapshots I've created the tx 141, which cannot be executed because the tx 140 needs to be executed first. |
I think the warning in this case still makes sense. You can only execute them in order, so 140 -> 141 -> 142. |
No, tx nonce 140 doesn't exist at all, it was never created, so it's not in the backend in this case |
|
Oh, now I get it. You skipped 140 and created 141 by overriding the nonce of the previous tx. Still, the backend returns 142 as the recommended nonce, and the warning message relies on that. |
|
@francovenica does this fix solve the issue described in #3506 though? |
|
We still have issues. This is the attempt of execution of the current tx. It seems that, because the recommended nonce (the one that will be suggested when I create a new tx) is 1 more, the warning message is shown. |
|
Great catch, @francovenica! |






What it solves
Resolves #3506
How this PR fixes it
The condition to show a nonce warning was relying on
lastTxNonce, whereas the warning itself was displaying arecommendedNonce.Now it's using
recommendedNoncein both places, so it should never show the absurd message from the bug report.I've also renamed the
useRecommendedNoncehook.How to test it