-
Notifications
You must be signed in to change notification settings - Fork 337
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: allow deleting only last tx and duplicates #3554
Conversation
Branch preview✅ Deploy successful! |
ESLint Summary View Full Report
Report generated by eslint-plus-action |
📦 Next.js Bundle Analysis for safe-wallet-webThis analysis was generated by the Next.js Bundle Analysis action. 🤖 This PR introduced no changes to the JavaScript bundle! 🙌 |
Coverage report
Test suite run success1419 tests passing in 198 suites. Report generated by 🧪jest coverage report action from e4cbfd3 |
If there are 2 tx with the same nonce, but one of them is a signed Rejection, then I think we shouldn't allow the tx deletion of the "good transaction", since the user would be left with only the rejection, and we know users still don't know that they can create a new tx with an old nonce, so chances are they will end up executing that deletion to get rid of it. Beyond that the ticket is fine. |
That's the purpose of a rejection tx though, isn't it? |
What it solves
Resolves #3551
How this PR fixes it
Only the last transaction in the queue and transactions with a duplicate nonce are allowed to be deleted.
I used
useRecommendedNonce() - 1
to calculate the last transaction nonce.If a tx is in principle deletable but isn't the last one or a duplicate, we show a tooltip.