fix: use disconnect() instead of clearActiveAccount() for Beacon logout#143
Merged
hui-an-yang merged 2 commits intomainfrom Mar 3, 2026
Merged
fix: use disconnect() instead of clearActiveAccount() for Beacon logout#143hui-an-yang merged 2 commits intomainfrom
hui-an-yang merged 2 commits intomainfrom
Conversation
…or Beacon logout clearActiveAccount() only removes the active account reference but leaves beacon:matrix-selected-node and peer data in localStorage. When a cached relay node goes offline, users get permanently stuck until they manually clear browser storage. disconnect() calls client.destroy() which clears all beacon:* keys, making it the correct method for logout. The manual peer removal loop is also unnecessary since destroy() handles that. Fixes ecadlabs/taquito#3329
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.
Summary
wallet.value.client.clearActiveAccount()withwallet.value.disconnect()in the BeaconWallet disconnect pathdestroy()handles it)clearActiveAccountfromProgrammaticWallettype and mock objectsExtendedPeerInfoimportclearActiveAccount()only removes the active account reference but leavesbeacon:matrix-selected-nodeand other Beacon state in localStorage. When a cached relay node goes offline, users get permanently stuck until they manually clear browser storage.disconnect()callsclient.destroy(), which clears allbeacon:*keys.Related: ecadlabs/taquito#3329, ecadlabs/taquito#3330
Test plan
beacon:*keys are removed from localStorage