-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
fix: ProviderUtil.getProvider('eip155')
returns undefined
when using wagmi adapter
#3672
Conversation
🦋 Changeset detectedLatest commit: 3fe7109 The changes in this PR will be included in the next version bump. This PR includes changesets to release 19 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Coverage Report
File Coverage
|
@@ -422,6 +422,8 @@ export class WagmiAdapter extends AdapterBlueprint { | |||
return | |||
} | |||
|
|||
const provider = (await connector.getProvider().catch(() => undefined)) as Provider | undefined |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do we have to use as Provider | undefined
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems like wagmi's provider type doesn't match with our provider type. It's throwing this error:
Type 'unknown' is not assignable to type 'Provider | W3mFrameProvider | UniversalProvider | undefined'.ts(2322)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should we even add the connector if it's undefined? Seems like a case where things would bug out
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should add connector even if there is no provider. Because wagmi has internal logic when it comes to connecting to a connector since we do this in the wagmi adapter.
await connect(this.wagmiConfig, { connector })
Hi i'm also running into this issue. It worked fine in 1.2.0, then upgraded to 1.6.2 and seeing this issue. For some reason if the user is connected and we refresh page, then |
Description
Fixed an issue where
ProviderUtil.getProvider('eip155')
returnedundefined
for wagmi adapter when connected to a wallet.Type of change
Associated Issues
For Linear issues: Closes APKT-2041
Checklist