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

Wagmi fails to track new connections following initial error in modal #90

Open
sumicet opened this issue Jul 14, 2023 · 0 comments
Open

Comments

@sumicet
Copy link

sumicet commented Jul 14, 2023

If an error happens when the modal is opened, wagmi's loading state will revert to false and will stop tracking further events. Since the modal stays open, the user can select another provider and establish a connection, however, wagmi does not register this new connection.

Steps to reproduce:

  • Click connect
  • Select Google or any other provider that triggers a popup
  • Close the Google window that displays your list of accounts
  • Notice how wagmi's loading state is now set to false (most likely due to an error being thrown inside connect)
  • Select Google and connect with one of your Google accounts
  • Notice how wagmi's address field is empty

https://codesandbox.io/p/github/sumicet/web3auth-bugs/infinite-loading-state?file=/src/App.tsx:7,1

Expected behavior: Either close the modal when an error happens or keep wagmi's state in sync with the modal's state.

@web3auth/modal: 6.1.3
@web3auth/web3auth-wagmi-connector: 4.0.1
@sumicet sumicet changed the title Wagmi fails to track wew connections following initial error in modal Wagmi fails to track new connections following initial error in modal Jul 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant