Fix/frontend cleanup 556 559 - #601
Merged
ogazboiz merged 13 commits intoMay 31, 2026
Merged
Conversation
Move getStreamsEndpointCandidates, toTokenAmount, and STROOPS_DIVISOR into lib/api/_shared.ts so dashboard and streams modules share one resolver. Co-authored-by: Cursor <cursoragent@cursor.com>
…ypt#558) Replace duplicated endpoint resolver and stroop conversion with imports from lib/api/_shared. Co-authored-by: Cursor <cursoragent@cursor.com>
…ons (LabsCrypt#556, LabsCrypt#558) Import shared helpers from _shared.ts and delete unused cancelStream/withdrawStream REST helpers that only backed removed hooks. Co-authored-by: Cursor <cursoragent@cursor.com>
Cancellation is handled via Soroban on stream detail; this hook had no importers. Co-authored-by: Cursor <cursoragent@cursor.com>
Incoming withdrawals use useIncomingStreams; this hook had no importers. Co-authored-by: Cursor <cursoragent@cursor.com>
Banner was never mounted anywhere in the app layout. Co-authored-by: Cursor <cursoragent@cursor.com>
Config only supported the removed Banner component. Co-authored-by: Cursor <cursoragent@cursor.com>
…ypt#559) Provides focus trap, Escape-to-close, body scroll lock, and focus restoration on unmount. Co-authored-by: Cursor <cursoragent@cursor.com>
…izard (LabsCrypt#559) Set role=dialog, aria-modal, aria-labelledby, and wire useModalDialog for keyboard accessibility. Co-authored-by: Cursor <cursoragent@cursor.com>
…dal (LabsCrypt#559) Set role=dialog, aria-modal, aria-labelledby, and wire useModalDialog for keyboard accessibility. Co-authored-by: Cursor <cursoragent@cursor.com>
…sCrypt#559) Set role=dialog, aria-modal, aria-labelledby, and wire useModalDialog with input auto-focus. Co-authored-by: Cursor <cursoragent@cursor.com>
…bsCrypt#559) Co-authored-by: Cursor <cursoragent@cursor.com>
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.
Pull Request: Frontend cleanup — dead code removal, modal a11y, shared API helpers
Summary
This PR addresses four related frontend maintenance issues in a single branch:
useCancelStream/useWithdrawStreamhooks and their dead REST helpers (cancelStream/withdrawStreaminlib/api/streams.ts). Active cancel/withdraw flows remain on Soroban (stream detail) anduseIncomingStreams.Bannercomponent andbanner.config.ts(no global announcement banner is wired today).lib/api/_shared.ts;dashboard.tsandapi/streams.tsnow import from one source.role="dialog",aria-modal,aria-labelledby, Tab focus trapping, and focus restoration on close forStreamCreationWizard,CancelConfirmModal, andTopUpModalvia a shareduseModalDialoghook (Escape-to-close preserved).Changes by issue
hooks/useCancelStream.ts,hooks/useWithdrawStream.ts; trimmedlib/api/streams.tscomponents/ui/Banner.tsx,lib/banner.config.tslib/api/_shared.ts; updatedlib/dashboard.ts,lib/api/streams.tshooks/useModalDialog.ts; updated stream-creation modalsTest plan
npm run build --workspace=frontendpassesnpm test --workspace=frontendpasses (existing utils tests unchanged)cancelStream/withdrawStreamREST helpersNotes
shortenAddressindashboard.tswas left local (dashboard-only);streams.tscontinues usingshortenPublicKeyfrom wallet utils.