fix: resolve api route mapping, response type validation, and signatu…#325
Merged
AlAfiz merged 1 commit intoJun 16, 2026
Merged
Conversation
…re store render loop - Corrected invoice API endpoint route from /invoices to /api/invoices in src/lib/api.ts - Updated InvoicesResponse and isInvoicesResponse validator in types/api.ts to support the paginated payload structure - Updated page.tsx to bind res.data.data array instead of the raw pagination wrapper - Refactored useSigningActions selector in src/stores/signatureStore.ts to use individual selectors to prevent render loops - Stabilized root layout.tsx context provider ordering and child element tree - Cleaned up unused variables and solved TanStack Query / Framer Motion type errors
4 tasks
AlAfiz
reviewed
Jun 18, 2026
AlAfiz
left a comment
Contributor
There was a problem hiding this comment.
Nice and Great work done. A proper clean up
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.
PR Description: Monorepo Cleanup, API Route Fixes, and Layout Stabilization
Overview
This PR addresses code debt, removes unused files accumulated during the hackathon phase, resolves layout/provider crashes, and fixes runtime API and state rendering loops to make the application fully stable in both development and production builds.
Key Changes
1. Codebase Cleanup & Technical Debt Reduction
useDebounce,useWalletConnection,useSorobanEvents), test files, mock scripts, and unused components (e.g.,SwapInterface,ExpertModeModal,Sidebar).SliderandCheckboxcomponents.2. Layout & Context Stabilization
SettingsProvider,QueryProvider,BackendHealthProvider, andNetworkGuard) insrc/app/layout.tsxto prevent context bails downstream.useSigningActionsselector hook insrc/stores/signatureStore.tsto query slice variables individually, preventing React hydration loops and resolving the Maximum update depth exceeded runtime overlay error.3. API Path Resolution & Paginated Validation
/invoicesto/api/invoicesinsrc/lib/api.tsto properly call the Next.js API route.InvoicesResponsetype definition and theisInvoicesResponsevalidator function intypes/api.tsto accommodate the paginated API response payload shape ({ data: InvoiceSummary[], pagination: ... }).src/app/page.tsxto callsetInvoices(res.data.data).Verification & Testing
tsc --noEmitreturning zero compilation errors.npm run buildsuccessfully (Exit code: 0).http://localhost:3000/; verified the Verified Asset Pipeline dashboard table retrieves, validates, and renders the mock invoice rows cleanly.closes #271