Skip to content
New issue

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

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

Already on GitHub? # to your account

fix(wallets): prevent WalletConnect v1 session data collision #329

Merged
merged 1 commit into from
Dec 18, 2024

Conversation

drichar
Copy link
Collaborator

@drichar drichar commented Dec 18, 2024

Description

This PR fixes an issue where inactive WalletConnect v1 wallets (Pera/Defly) would overwrite the active wallet's connected accounts during session resume. The fix skips the reconnectSession call for inactive wallets since the library already handles wallet state persistence.

Details

  • Skip reconnectSession for inactive Pera/Defly wallets
  • Prevent WalletConnect v1 storage key collision between Pera and Defly wallets
  • Add test coverage to verify fix

Skip `reconnectSession` for inactive Pera/Defly wallets since wallet state
is already managed by use-wallet. This prevents a bug where both wallets
share the same WalletConnect v1 storage key, causing the inactive wallet
to overwrite the active wallet's connected accounts on session resume.
@drichar drichar merged commit 481da35 into main Dec 18, 2024
1 check passed
@drichar drichar deleted the fix/pera-defly-resume-session branch December 18, 2024 22:44
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant