Repository navigation
fix: expire replaced and timed-out pending transactions and popups - #648
Closed
ocakciomursel-pixel wants to merge 2 commits into
Closed
ocakciomursel-pixel wants to merge 2 commits into
ocakciomursel-pixel wants to merge 2 commits into
Conversation
This branch is waiting to be deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #144. Find the confirmed replacement using the original sender/nonce and an exponential lookback plus binary search over mined nonce transitions. Recheck the original receipt before replacement discovery and verify the replacement receipt's hash/block. Atomically replace the old pending entry with the real hash and receipt. Distinguish repricing, cancellation and unrelated replacement: preserve claim/approval metadata only for repricing; cancellations never display a successful original action. Clear the old popup and avoid duplicate replacement notifications.
The same receipt handler runs on new blocks and the local 30-minute deadline, including ordinary confirmations discovered by the timer. RPC calls are bounded; unknown/reorganized receipts stay pending; stale async results after cleanup are ignored. Expiration only removes local UI state and does not cancel an on-chain transaction. A missing summary on ordinary finalization preserves existing text.
Validation: all 39 transaction Jest tests pass across eight files, including real React updater checks for repricing, cancellation, duplicate notifications and confirmation without new blocks. TypeScript noEmit passes. The original expiration regression failed on unchanged main; the existing summary-loss regression now passes. The pure polling-policy tests no longer import the entire wallet SDK. No live wallet/chain transaction or production-build claim.
Please review the completed replacement handling and the proposed 30-minute UI timeout. Bounty eligibility, amount and payment currency remain unconfirmed.