perawallet / connect

JavaScript SDK for integrating Pera Wallet to web applications.
https://perawallet.app
Other
64 stars 20 forks source link

feat: Use unique storage id #91

Closed gabrielkuettel closed 1 year ago

gabrielkuettel commented 1 year ago

In @txnlab/use-wallet, we allow multiple providers to be connected at the same time.

However, with providers based on WalletConnect, this isn't possible because they all use the default walletconnect key in browser storage to store metadata. This causes conflicts when multiple WalletConnect providers are connected (e.g., Pera, Defly, or a generic WalletConnect session).

Passing in a unique storageId key to the WalletConnect constructor resolves this conflict.

mucahit commented 1 year ago

Hey @gabrielkuettel, thanks! We appreciate your effort & time, but since it is a breaking change for existing users (active sessions will end up disconnecting), we decided not to proceed with this change. Anyways, we are working on WalletConnect V2 migration, and we will address this issue with that migration. 🙏