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

Component 'Account' does not show web3modal dialog when clicking 'connect' button #53

Open
doerfli opened this issue Oct 31, 2022 · 1 comment

Comments

@doerfli
Copy link

doerfli commented Oct 31, 2022

Hello there

I am currently building a simple poc app to demonstrate chain access from a webapp. The app is based on next with react/antd and i want to make use of eth-hooks and eth-components to use standard components for display.
I have build a simple page that should use the Account component to handle the wallet connection and show the current account details.
I have implemented the poc in the repository https://github.com/doerfli/eth-components-web3modallogin
The page in question is the index (https://github.com/doerfli/eth-components-web3modallogin/blob/main/pages/index.tsx) using the ShowAccount component (https://github.com/doerfli/eth-components-web3modallogin/blob/main/components/show_account.tsx) to display the data. The configuration for the EthersModalConnector can be found in https://github.com/doerfli/eth-components-web3modallogin/blob/main/utils/appConfig.ts

Now when i run the application, the following problem appears

  • on the desktop it will automatically connect to my Metamask without showing any web3modal dialog. But at least the connection works and i can call be contract in the Counter react component.
  • on the mobile it will show a grey opaque modal without any content.

Screenshot_2022-10-31-16-44-55-54_3aea4af51f236e4932235fdada7d1643

I would like to have a web3modal dialog shown in both situations so the user can choose his wallet as well as the chain to connect to.

Can you please help me and figure out what i am doing wrong? I somehow have the feeling that for some reason the web3modal component is skipped when connecting.

Thanks,
Marc

@ShravanSunder
Copy link
Member

@doerfli i would recommend look at the scaffold-eth-typescript implementation of the login: https://github.com/scaffold-eth/scaffold-eth-typescript

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

2 participants