Skip to content
This repository has been archived by the owner on Mar 11, 2024. It is now read-only.

Walletconnect: auto connect #794

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

Lbqds
Copy link
Member

@Lbqds Lbqds commented Sep 12, 2023

The branch for the @alephium/web3 is here: alephium/alephium-web3#270

When testing with npm run start:electron, please be mindful NOT to use CTRL + C to shutdown the client. Electron won't persist localStorage in this case. And I tried process.on('exit', () => app.quit()), but it still does not work.


const tryRestoreLastSession = useCallback(
async (client: SignClient) => {
if (!client.session.length) return resetSession()
Copy link
Member

Choose a reason for hiding this comment

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

Note to myself: When checking for active sessions, we should probably first cross-reference them with the active pairings. See: https://github.com/alephium/mobile-wallet/blob/master/src/utils/walletConnect.ts#L50-L58

@nop33
Copy link
Member

nop33 commented Oct 24, 2023

Thanks for this PR @Lbqds!

As per request from the community I've implemented in my PR #802 the feature of handling multiple WalletConnect sessions. This includes initializing the app state with the current active WalletConnect sessions, derived from the client. I believe this covers the use case of this PR as well, so I believe it's not needed anymore.

Let me know if you think differently!

@Lbqds
Copy link
Member Author

Lbqds commented Oct 24, 2023

Great work👍, feel free to close it if it's not needed!

@nop33
Copy link
Member

nop33 commented Oct 24, 2023

I think I'll keep it open until the new desktop wallet version is released, then we can test together to verify that the requirements of this PR are met 😉

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants