Replies: 2 comments
-
@MrJackdaw may have advice about this. Some wallets (MyAlgo and MetaMask) don't have a concept of "disconnecting" so, we haven't yet added support for a general purpose way to do this. You want to make 1 wallet fallback that is for the JerryZazWallet and it internally has a way of routing to either MyAlgo or WalletConnect depending on what your users want. There's no special or sacred about our wallet fallbacks... you can implement your own quite easily. Finally, there are a few issues about this in our Github and I've been thinking a lot about how to fix this for everyone, but haven't figured out something yet, so I hope to be able to give you a great solution soon. |
Beta Was this translation helpful? Give feedback.
-
This is a pretty important feature IMO. The Pera Wallet connect JS package implemented it pretty well. It even removes the WalletConnect session from your mobile app when you disconnect, so you don't have to go in and clean it manually. Here is how they do it in the perawallet/connect package. https://github.com/perawallet/connect/blob/main/src/PeraWalletConnect.ts#L169 disconnect() {
const killPromise = this.connector?.killSession();
killPromise?.then(() => {
this.connector = null;
});
resetWalletDetailsFromStorage();
return killPromise;
} Maybe you could pass the killSession() function as an arg for |
Beta Was this translation helpful? Give feedback.
-
Hey all, I have questions around walletFallback.
I have a component that lets the user choose between WalletConnect and MyAlgo. If I choose WC, then cancel the QR code and tap on MyAlgo, WC's QR prompt pops up again. The second time my component's action is triggered, setWalletFallback is not overriding walletFallback so looks like I need to clear it first and I don't see any function for that in the sources.
Also, after a successful session where WalletConnect was used, if the user closes the tab, comes back and again chooses WC, I don't need to scan the QR code again. The connection is cached, which makes sense. My concern is that I need to be able to clear that connection, allowing the user to disconnect, and I can't find an option for disconnect in the sources.
Recap, two similar asks. I need a way to reset walletFallback, and I'm looking for an elegant solution to disconnect the wallet.
Thank you!
Beta Was this translation helpful? Give feedback.
All reactions