-
Notifications
You must be signed in to change notification settings - Fork 626
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: use ethers peer dependency for providers #307
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
"react": ">=17", | ||
"react-dom": ">=17", | ||
"wagmi": "^0.3.2" | ||
}, | ||
"devDependencies": { | ||
"@ethersproject/abstract-provider": "^5.5.1", | ||
"@ethersproject/providers": "^5.5.1", |
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.
We still need this as a dev dependency for internal type checking purposes, but not for consumers.
"@types/qrcode": "^1.4.2", | ||
"@vanilla-extract/private": "^1.0.2", | ||
"autoprefixer": "^10.4.0", | ||
"ethers": "^5.0.0", |
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.
This is the same version range used through the rest of the codebase. It resolves to a much newer version in the lock file.
@@ -18,7 +17,7 @@ export function TransactionStoreProvider({ | |||
}: { | |||
children: React.ReactNode; | |||
}) { | |||
const provider = useProvider<BaseProvider>(); |
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.
This didn't appear to be needed anymore. @nickbytes let me know if I'm missing something.
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.
lfg
We currently have a direct dependency on
@ethersproject/providers
, but this means that provider instances generated by RainbowKit can potentially clash with the version of Ethers.js installed alongside wagmi. To avoid this, we’re now relying on theethers
peer dependency that wagmi already requires, ensuring that there's only ever a single copy ofethers
between them.