Skip to content

fix: expire replaced and timed-out pending transactions and popups - #648

Closed
ocakciomursel-pixel wants to merge 2 commits into
GoodDollar:masterfrom
ocakciomursel-pixel:codex/fix-goodprotocolui-144
Closed

ocakciomursel-pixel wants to merge 2 commits into
GoodDollar:masterfrom
ocakciomursel-pixel:codex/fix-goodprotocolui-144

Conversation

@ocakciomursel-pixel

@ocakciomursel-pixel ocakciomursel-pixel commented Oct 20, 2026 •

Copy link
Copy Markdown

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.

@L03TJ3 L03TJ3 closed this Oct 20, 2026

This branch is waiting to be deployed

1 waiting deployment
external — fe73fed1 Waiting Oct 20, 2026 by ocakciomursel-pixel via authorize #1086
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Replacement/Cancelled transactions are not handled in the pending/confirmed cycle

2 participants