fixed wallet disconnect - #476
Merged
ExcelDsigN-tech merged 2 commits intoAug 25, 2026
Merged
Conversation
|
@Marvell69 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! 🚀 |
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
| await logoutBtn.scrollIntoViewIfNeeded(); | ||
|
|
||
| // Click and wait for navigation/reload that our app triggers | ||
| const [response] = await Promise.all([ |
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.
Fix Wallet Disconnect, Localization Gaps, Offline Support & Real-Time Events
Summary
This PR addresses four important frontend/platform issues affecting wallet reliability, localization, offline usability, and real-time user feedback.
The changes improve wallet disconnect/reconnect behavior, complete missing Spanish and Tagalog translations, introduce offline-first capabilities for critical borrower workflows, and add real-time event handling through Server-Sent Events (SSE).
The goal is to improve reliability and accessibility without changing existing core business logic or user-facing APIs unnecessarily.
What Changed
1. Fix Wallet Disconnect & Stale Service Worker State
Updated
frontend/src/app/components/WalletProvider.tsxto properly clean up wallet-related state when a user disconnects.Changes
Unregister active service workers during wallet disconnect.
Clear wallet-related data from:
localStoragesessionStorageForce a page reload after disconnect to ensure stale authentication and wallet state cannot persist.
Verify the disconnect → reconnect flow.
Test behavior across:
Why
A stale service worker can retain outdated authentication or wallet state, resulting in failed transactions, broken reconnect attempts, and potentially unsafe stale application state.
2. Complete Spanish & Tagalog Message Catalogs
Updated the frontend message catalogs under:
frontend/src/app/[locale]/messages/Changes
en.jsonfor the complete set of message keys.es) translations.tl) translations.Why
Missing translations currently cause English fallbacks or untranslated message keys for users relying on Spanish or Tagalog, particularly across critical financial workflows.
3. Add Offline Support for Critical Borrower Workflows
Introduced offline capabilities for borrowers and agents operating with unreliable connectivity.
Changes
Supported Offline Workflows
Why
Users in areas with intermittent connectivity should not lose access to important loan information or have their repayment attempts silently fail because of temporary network loss.
4. Add Real-Time Event Streaming with SSE
Added real-time frontend infrastructure for receiving important application events without relying on frequent polling.
Supported Events
loan_statusrepaymentdisputesettlementChanges
GET /api/events/streamuseEventStreamReact hook underfrontend/src/app/hooks/.Why
Real-time updates provide immediate feedback for important financial events such as repayment confirmations, loan-status changes, dispute updates, and settlement completion.
Files / Areas Affected
Wallet
frontend/src/app/components/WalletProvider.tsxCloses #418
Closes #421
Closes #425
Closes #431