Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

[bug] WalletConnect + MetaMask does not reconnect on page refresh #214

Closed
1 task done
javamonn opened this issue Feb 24, 2022 · 3 comments
Closed
1 task done

[bug] WalletConnect + MetaMask does not reconnect on page refresh #214

javamonn opened this issue Feb 24, 2022 · 3 comments

Comments

@javamonn
Copy link

Is there an existing issue for this?

  • I have searched the existing issues

Package Version

0.2.9

Current Behavior

When using the autoConnect prop on the Provider, if a user connects via Wallet Connect using MetaMask (I did not test other Wallet Connect clients) and refreshes the page, the user appears connected from the perspective of wagmi (useAccount) returns an address, but actions involving the user's wallet will fail. Specifically, prompting a signature with useSignMessage seems to send a message across the Wallet Connect bridge and displays within the user's wallet, but never resolves in wagmi. Prompting a transaction with useTransaction calcuates gas, but does not display the transaction within the user's wallet.

Expected Behavior

After connecting via Wallet Connect and refreshing the page, the user remains connected and is able to complete actions with their wallet.

Steps To Reproduce

  1. Connect using Wallet Connect
  2. Refresh the page, have autoConnect set on wagmi provider
  3. Attempt to use useTransaction or useSignMessage

Link to Minimal Reproducible Example (CodeSandbox, StackBlitz, etc.)

No response

Anything else?

No response

@tmm
Copy link
Member

tmm commented Feb 24, 2022

Was able to confirm this issue with Rainbow using the demo in the Sign Message guide. This doesn't happen with the MM or WalletLink connectors.

Seems related to this WalletConnect/walletconnect-monorepo#718

@javamonn
Copy link
Author

Agree that the issue on walletconnect looks to be the cause, thanks for flagging that. Not sure if you want to close this in favor of the upstream issue or leave this open to track.

@tmm tmm closed this as completed Feb 24, 2022
Copy link
Contributor

This issue has been locked since it has been closed for more than 14 days.

If you found a concrete bug or regression related to it, please open a new bug report with a reproduction against the latest wagmi version. If you have any other comments you can create a new discussion.

@github-actions github-actions bot locked and limited conversation to collaborators Jan 19, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants