Skip to content

feat: improve sdk disconnection flow #14649

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 5 commits into
base: main
Choose a base branch
from
Draft

feat: improve sdk disconnection flow #14649

wants to merge 5 commits into from

Conversation

abretonc7s
Copy link
Contributor

@abretonc7s abretonc7s commented Apr 14, 2025

Description

Related issues

Depends on #14605

Manual testing steps

  1. Go to this page...

Screenshots/Recordings

Before

failed_deletion.mov

After

  • Connection delete from the UI even if not found on server.

Pre-merge author checklist

Pre-merge reviewer checklist

  • I've manually tested the PR (e.g. pull and build branch, run the app, test code being changed).
  • I confirm that this PR addresses all acceptance criteria described in the ticket it closes and includes the necessary testing evidence such as recordings and or screenshots.

abretonc7s and others added 4 commits April 11, 2025 18:52
- Removed unused imports and consolidated necessary ones for better readability.
- Refactored the `hideSheet` and `handleConfirm` functions to use `useCallback` for performance optimization.
- Simplified the rendering logic in `renderConnectScreens` by removing unnecessary conditions.
- Enhanced overall code structure for improved maintainability.
- Added `markedForDeletion`, `failedTerminationAttempts`, and `lastTerminationAttempt` properties to the `Connection` interface to manage connection states more effectively.
- Updated `SDKSessionsManager` to filter out connections marked for deletion.
- Enhanced `removeChannel` logic to handle termination attempts and retry logic based on failure counts.
- Implemented checks in `asyncInit` to retry termination for connections marked for deletion.
Copy link
Contributor

CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes.

@metamaskbot metamaskbot added the team-sdk SDK team label Apr 14, 2025
@abretonc7s abretonc7s changed the title Sdkdisconnect feat: improve sdk disconnection flow Apr 14, 2025
@abretonc7s abretonc7s changed the base branch from sdkui to main April 14, 2025 12:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
team-sdk SDK team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants