Skip to content

feat(portal): add financing slice w/ optimistic updates + global 5xx …#374

Merged
Oluwaseyi89 merged 1 commit into
CarbonScribe:mainfrom
Cedarich:feat/financing-slice-and-global-5xx-handler
May 30, 2026
Merged

feat(portal): add financing slice w/ optimistic updates + global 5xx …#374
Oluwaseyi89 merged 1 commit into
CarbonScribe:mainfrom
Cedarich:feat/financing-slice-and-global-5xx-handler

Conversation

@Cedarich
Copy link
Copy Markdown
Contributor

PR description Implements global financing state and consistent server-error handling across the Project Portal.

  • Adds a financing slice to the unified Zustand store managing credits, forward sales, payments, and payouts (with caching + backgrCound refresh).
  • Adds optimistic update flows for key mutations (mint credits, create forward sale, initiate payment, distribute revenue) with rollback/failed-state handling.
  • Refactors financing components to use the global slice instead of local useState .
  • Implements a global 5xx error handler (Axios interceptor already existed; adds fetch-based handling and a global unhandled rejection guard) with branded toast feedback.
  • Adds/updates tests for the financing slice and global 5xx handling.
  • Fixes TypeScript diagnostics introduced during integration.
    Issues

Closes #329
Closes #334
closes #327

@drips-wave
Copy link
Copy Markdown

drips-wave Bot commented May 30, 2026

@Cedarich 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! 🚀

Learn more about application limits

@Cedarich
Copy link
Copy Markdown
Contributor Author

@Oluwaseyi89

@Oluwaseyi89 Oluwaseyi89 merged commit 5a2f063 into CarbonScribe:main May 30, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add global error handler for 5xx API responses Add financing slice to the unified Zustand store Add error.tsx error boundary page

3 participants