Fix issues #123, #325, #326, #328: RPC timeout, test coverage, dead code removal - #334
Fix issues #123, #325, #326, #328: RPC timeout, test coverage, dead code removal#334presidojay1 wants to merge 4 commits into
Conversation
Fixes conduit-protocol#123 - Added timeout parameter to checkRecipientExists function in lib/soroban.ts - Set 10-second timeout for recipient validation in create page - Prevents infinite loading state when RPC provider times out - Added error logging for better debugging
Fixes conduit-protocol#328 - Removed BatchStreamCreator.tsx which was never imported by any page - Removed its test file BatchStreamCreator.test.tsx - Component had non-functional submit handler that just displayed error - Reduces dead weight and prevents confusion for future contributors
Fixes conduit-protocol#326 Navbar.test.tsx: - Tests mobile menu opening/closing on hamburger click - Tests menu closing on route change - Tests menu closing on Escape key press - Tests iOS Safari backdrop click workaround (issue conduit-protocol#143) - Tests keydown listener cleanup - Tests aria-expanded attribute - Tests ErrorBoundary integration ConnectButton.test.tsx: - Tests 20s connect timeout safety net - Tests error message rendering from connect() rejection - Tests wallet connection/disconnection flow - Tests mount-guarded state updates - Tests timeout timer cleanup - Tests rapid connect state toggles
…tions Fixes conduit-protocol#325 WithdrawButton.test.tsx: - Tests complete state machine: idle → signing → submitting → done/error - Tests mount-guarded state updates to prevent memory leaks - Tests error handling for wallet disconnection - Tests query invalidation after successful withdrawal - Tests onSuccess callback execution - Tests dismiss and retry functionality - Tests protocol fee info display - Tests button disabled states during operations StreamActions.test.tsx: - Tests role-gated button rendering (sender vs recipient) - Tests run() helper's pending/error handling - Tests top-up modal amount validation including MAX_I128 bound check - Tests pause, resume, cancel, clawback operations - Tests query invalidation after successful actions - Tests modal open/close functionality - Tests mount-guarded state updates - Tests all button states for active/paused/ended streams
|
@presidojay1 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! 🚀 |
|
Thanks for the contribution here — squash-merging this now. Any follow-ups we'll track in a fresh issue. 🚀 |
|
Every change in this PR — the |
Summary
This PR addresses 4 GitHub issues with bug fixes, dead code removal, and comprehensive test coverage.
Changes
🐛 Issue #123: Token Selector infinite loading state
checkRecipientExistsfunction inlib/soroban.ts🧹 Issue #328: Dead BatchStreamCreator code
BatchStreamCreator.tsxwhich was never imported by any pageBatchStreamCreator.test.tsx✅ Issue #326: Missing test coverage for Navbar and ConnectButton
Navbar.test.tsx (10 tests):
ConnectButton.test.tsx (11 tests):
✅ Issue #325: Missing test coverage for WithdrawButton and StreamActions
WithdrawButton.test.tsx (17 tests):
StreamActions.test.tsx (20 tests):
Testing
All new test files follow the existing testing patterns in the codebase using Vitest and React DOM testing.
Checklist
Commits
fix: add timeout handling to prevent infinite loading in recipient checkrefactor: remove dead BatchStreamCreator codetest: add comprehensive test coverage for Navbar and ConnectButtontest: add comprehensive test coverage for WithdrawButton and StreamActionsCloses #123
Closes #325
Closes #326
Closes #328