Skip to content
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

Disconnect all addresses #10177

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

salman-neslit
Copy link
Collaborator

@salman-neslit salman-neslit commented Dec 6, 2024

Link to Issue

Closes: #8711

Description of Changes

  • Added functionality to disconnect all addresses from a community for a user via the "Disconnect All Addresses" option in the edit profile page.
  • Prevented users from disconnecting Magic Wallet addresses from communities.
  • Ensured that users cannot leave a community if they are the sole admin without assigning another admin.
  • Implemented logic to allow partial disconnection when some conditions are not met (e.g., Magic Wallet addresses or admin constraints).

"How We Fixed It"

Test Plan

  • Go to Edit Profile Page.
  • Navigate to Linked addresses section.
  • Disconnect all address where there is only one admin of that community or there is a magic wallet address associated.
  • Verify that it does not allow users to leave.
  • Now disconnect where there are not the above 2 constrains verify that all addresses against the community are disconnected.

Deployment Plan

Other Considerations

@salman-neslit salman-neslit marked this pull request as ready for review December 7, 2024 00:30
@salman-neslit salman-neslit changed the base branch from salman/Issues-8709-address-management-chart to master December 9, 2024 21:28
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this should be a new trpc route. Plz move it to the libs/model, there are sample route implementations there.

@mzparacha mzparacha requested a review from Rotorsoft December 10, 2024 14:50
@dillchen dillchen linked an issue Dec 11, 2024 that may be closed by this pull request
Copy link
Contributor

@masvelio masvelio left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was getting a lot of errors on both disconnecting and deleting addresses. There are many cases that we should probably handle in better way UX wise.

Some errors example I was getting:

"Community must have at least 1 admin. Please assign another community member as admin, to leave this community."

"Cannot delete Magic Link address"

Kapture.2024-12-12.at.10.49.08.mp4

{address.community.id}. Your contributions and comments will remain.
Don't worry, you can rejoin anytime.
{isBulkDelete
? `By leaving ${address?.community.id} you will disconnect all
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ideally it should be community name instead of id

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.

Disconnect all addresses
3 participants