Conversation
This was referenced Mar 17, 2026
Contributor
Author
How to use the Graphite Merge QueueAdd the label merge-queue to this PR to add it to the merge queue. You must have a Graphite account in order to use the merge queue. Sign up using this link. An organization admin has enabled the Graphite Merge Queue in this repository. Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue. This stack of pull requests is managed by Graphite. Learn more about stacking. |
DanielSinclair
approved these changes
Mar 18, 2026
75602a9 to
03db031
Compare
03db031 to
42dfaf0
Compare
e7790d0 to
16c4306
Compare
86a9470 to
34dca1f
Compare
42dfaf0 to
30f364b
Compare
34dca1f to
d9ff4ec
Compare
30f364b to
a3a4e82
Compare
…ct pattern Made-with: Cursor
a3a4e82 to
44b6b72
Compare
Contributor
Author
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.

Rewrite popup PendingTransactionWatcher to reactive useEffect pattern
The popup's
PendingTransactionWatcherusedusePoll+useWatchPendingTransactionsto actively fetch receipts on a timer. Now that the background handles receipt checking, the popup no longer needs to poll — it just needs to react when the background marks a tx as confirmed.This replaces the polling hook with a reactive
useEffectthat watches the pending store for non-pending (mined) transactions. When it sees one, it triggers React Query cache refetches, waits for the tx to appear in the consolidated cache, and then removes it from the pending store. The olduseWatchPendingTransactions.ts(323 lines) is deleted.Design choices & review focus
useEffectfires whenminedTransactionschanges (derived fromusePendingTransactionsStore). Since the background writes to Chrome storage and the popup subscribes via Zustand, the popup sees updates automatically without its own timer.invalidationTimeoutsRefcleanup — Timeouts are tracked in a ref and cleared on effect cleanup to prevent stale refetches if the address changes or component unmounts mid-cycle.PR-Codex overview
This PR focuses on enhancing the
PendingTransactionWatchercomponent to handle confirmed and failed transactions more effectively, updating the pending transactions in the store and improving the cleanup process for transactions.Detailed summary
useWatchPendingTransactionshook.watchPendingTransactions.PendingTransactionWatcherto:currentCurrencyandsupportedChainIds.