-
Notifications
You must be signed in to change notification settings - Fork 477
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: reset nonce if outdated #2383
Conversation
resets nonce to recommended nonce if the currently selected nonce is lower than the Safe nonce.
Branch preview✅ Deploy successful! https://fix_refresh_recommended_nonce--walletweb.review-wallet-web.5afe.dev |
ESLint Summary View Full Report
Report generated by eslint-plus-action |
@schmanu are you planning to finalize this PR? |
ESLint Summary View Full Report
Report generated by eslint-plus-action |
@katspaugh |
Issue: During the 2nd tx creation the nonce was still 285. My expectation was, that after the first tx is processed and indexed the nonce would change to 286 on its own. The result is that, the input "understood" that the nonce had to be updated (the little round arrow shows up, indicating that you can update to the suggested nonce) but the nonce itself never changed, so I'm able to sign the tx with the nonce 285 again: |
Sounds like an unwanted effect. The field probably got “updated” to the same value and became “dirty” which triggered the reset button. |
The best solution for the user would be that, as soon as you propose a tx the nonce in the safe updates right away, so the next tx already has blocked the nonce of the tx being processed, and if for some reason the tx fails the nonce is kicked back to the value it was before, but I'd assume that is not a feasible solution |
I returned it back to todo to check why the reset button appears. |
It appears because franco clicked inside the field. If we do not want this we have to revert to the additional previous fix in the SafeTxProvider. |
Ah, OK. Hauptsache it shouldn't show a reset button if the field was updated programmatically. |
What it solves
If the recommended nonce and safe nonce updates while the transaction modal is open, the current nonce is not updated and transactions with too low nonces are created which lead to validation errors when proposed.
How this PR fixes it
Resets nonce to recommended nonce if the currently selected nonce is lower than the Safe nonce.
How to test it
Checklist