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

Add Bug Title Here #4829

Open
napindc opened this issue Sep 11, 2024 · 0 comments
Open

Add Bug Title Here #4829

napindc opened this issue Sep 11, 2024 · 0 comments
Assignees
Labels
investigate Under investigation and may be a bug. v6 Issues regarding v6

Comments

@napindc
Copy link

napindc commented Sep 11, 2024

Ethers Version

6.13.2

Search Terms

No response

Describe the Problem

I'm using the wallet connection code (snippet below) and some users are having issues with Metamask (especially when they also have the Phantom wallet). Code snippet below

The user initially connected and got this error
Screenshot 2024-09-11 at 9 57 39 AM

After restarting browser / resetting cache, they tried it and then the Phantom wallet (which has ETh wallet support) pops up saying this. They had to disable the phantom connection to finally get it to work
Screenshot 2024-09-11 at 10 02 21 AM

Is there a way to more easily connect to the user's wallet? and also have it ignore these phantom issues

Code Snippet

const newProvider = new ethers.BrowserProvider(window.ethereum)
const newSigner = await newProvider.getSigner()

setProvider(newProvider)
setSigner(newSigner)

// Request a signature to verify the user
const message = `Please sign this message to verify your address. Timestamp: ${new Date().toISOString()}`
const signature = await newSigner.signMessage(message)
const signingAddress = newSigner.address

setAddress(signingAddress)

Contract ABI

No response

Errors

No response

Environment

No response

Environment (Other)

No response

@napindc napindc added investigate Under investigation and may be a bug. v6 Issues regarding v6 labels Sep 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
investigate Under investigation and may be a bug. v6 Issues regarding v6
Projects
None yet
Development

No branches or pull requests

2 participants