Conversation
…rvice - Updated the error handling in the TradeRouterService to utilize a new `fullCleanup` method, ensuring a more thorough reset of the service state upon initialization failure. This change improves the reliability of the service by ensuring that all relevant properties are reset, preventing potential issues from lingering state. - The `cleanup` method has been modified to preserve the `lastInitializedAssets`, allowing for potential reinitialization without losing previously stored data. This design choice balances the need for a clean state with the efficiency of retaining useful information for future operations. - Additionally, clarified comments in the `ConnectionManager` to indicate that observer notifications are now handled in the `connectToNetwork` method, reducing the risk of race conditions and improving code maintainability.
…ability - Introduced a new script, `test-connection-resilience.ts`, to systematically test the connection resilience of the application. This script simulates connection drops and verifies the recovery process, ensuring that the system can handle network interruptions gracefully. - The testing process includes multiple phases: initial setup, connection drop simulation, reconnection attempts, and functionality checks of the TradeRouter. This comprehensive approach allows for thorough validation of the connection handling logic and asset preservation during disconnections. - Additionally, enhancements were made to the `initializeSDK` and `FetchAssetService` to ensure that the TradeRouter is initialized with actual assets only when the asset service is ready, improving the overall reliability of the service initialization process. This change aligns with the goal of maintaining a robust and resilient application architecture.
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.
No description provided.