- Increased reconnect delay from 1 second to 2 seconds and reduced max reconnect attempts from 5 to 3 to minimize server load.
- Improved logging messages for connection status and abnormal closures, providing clearer insights during reconnection attempts.
- Added a ping mechanism to test connection stability and handle network connectivity issues more effectively.
These changes enhance the reliability and performance of the WebSocket service, contributing to a better user experience.
- Modified WebSocket configuration to allow enabling/disabling via environment variable, improving flexibility.
- Enhanced logging in WalletWebSocketService to provide clearer messages during reconnection attempts and notify users of WebSocket issues.
These changes improve the configurability and user experience of the wallet's WebSocket interactions.
- Added updateWalletBalance method in PaymentService to handle wallet balance updates from WebSocket notifications, improving wallet management.
- Deprecated the existing updateWalletBalance method in AuthService, redirecting calls to the new PaymentService method for better consistency and maintainability.
- Updated WalletWebSocketService to utilize PaymentService for balance updates, ensuring accurate wallet state management.
These changes enhance the architecture of wallet balance handling and streamline the update process across services.
- Introduced WalletWebSocketService to manage WebSocket connections for real-time wallet updates.
- Implemented methods to handle incoming messages, including wallet balance updates and transaction notifications.
- Updated WalletService to add transactions based on WebSocket notifications, ensuring accurate wallet state.
- Enhanced app configuration to support WebSocket settings, improving flexibility in connection management.
These changes enhance the wallet module's responsiveness and user experience by providing real-time updates on wallet activities.
Enhance WalletWebSocketService with improved logging and authentication event handling
- Added detailed logging throughout the WalletWebSocketService to aid in debugging and monitoring.
- Integrated eventBus to listen for authentication events, enabling automatic connection and disconnection based on user login status.
- Adjusted WebSocket connection logic to handle wallet credentials more effectively and ensure accurate balance updates.
- Improved error handling and connection management for a more robust WebSocket experience.
These enhancements improve the reliability and transparency of the wallet's WebSocket interactions, contributing to a better user experience.
Enhance wallet balance update logic and logging in WalletWebSocketService
- Improved logging for wallet balance updates to provide clearer insights into balance changes and payment adjustments.
- Refined balance adjustment logic to correctly handle outgoing and incoming payments, ensuring accurate wallet state.
- Updated AuthService to log both the old and new wallet balance during updates, enhancing debugging capabilities.
These changes improve the reliability and transparency of wallet balance management, contributing to a better user experience.
Refactor wallet balance update logic in AuthService and WalletWebSocketService
- Enhanced the updateWalletBalance method in AuthService to accept an optional walletId, allowing for more flexible wallet balance updates.
- Improved logging to indicate which wallet's balance is being updated, aiding in debugging.
- Updated WalletWebSocketService to retrieve the wallet ID from PaymentService before updating the balance, ensuring accurate wallet state management.
These changes improve the robustness and clarity of wallet balance handling across the application.