Repository navigation
fix: batch resolve dashboard events, hooks, and missing tests (#865, #863, #867, #868) - #1026
Merged
k-deejah merged 1 commit intoOct 22, 2026
Conversation
|
@investorUsman Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
investorUsman
force-pushed
the
fix/issue-865-use-outside-click
branch
from
October 20, 2026 00:19
35033d2 to
9346dd1
Compare
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.
Resolves #865
Resolves #863
Resolves #867
Resolves #868
Summary
Single comprehensive PR resolving all four assigned issues.
useOutsideClicknow always returns a cleanup that removes thepointerdown/touchstart/mousedowndocument listeners, so togglingenabledback tofalse(or unmounting) can no longer leave a dangling document-level listener.ContractEventFeedpreserves the last-seen ledger percontractIdacross unmount/remount, and the persisted value is now validated so corrupted data can't be forwarded togetEventsasNaN.NFTScreen.test.tsxcovers loading, error, empty, success, address-scoped fetches, and the disconnected state.StakingDashboard.test.tsxcovers validator rendering, the delegate flow, rewards totals, delegation adjustment, and claim-all.Changes
#865 —
useOutsideClickif (!enabled) return;so the effect always provides a cleanup.if (enabled), while cleanup always callsdocument.removeEventListenerfor all three event types.#863 —
ContractEventFeedreadPersistedFromLedgerignores non-numeric/negative sessionStorage values and falls back to the prop/default window.persistFromLedgerrefuses to write non-finite or negative ledgers.contractIdchange, corrupted values, and the unmount/remount resume path.#867 — NFTScreen tests
nft.getNftsis called with the connected address and that the disconnected prompt renders.createMockClient()fromsrc/lib/mock-client.ts.#868 — StakingDashboard tests
createMockClient()pattern in the mocked context.refreshAccountis called.handleClaimAllnow refreshes the connected account after claiming; the claim-all test asserts that refresh.Testing
tsc -b --noEmit: cleanNotes
Only the files relevant to these four issues are included; unrelated untracked files were intentionally left out.