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

fix: use ethers peer dependency for providers #307

Merged
merged 1 commit into from
May 5, 2022

Conversation

markdalgleish
Copy link
Contributor

@markdalgleish markdalgleish commented May 5, 2022

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 the ethers peer dependency that wagmi already requires, ensuring that there's only ever a single copy of ethers between them.

@markdalgleish markdalgleish requested a review from a team as a code owner May 5, 2022 04:57
@vercel
Copy link

vercel bot commented May 5, 2022

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated
rainbowkit-example ✅ Ready (Inspect) Visit Preview May 5, 2022 at 4:59AM (UTC)
rainbowkit-site ✅ Ready (Inspect) Visit Preview May 5, 2022 at 4:59AM (UTC)

"react": ">=17",
"react-dom": ">=17",
"wagmi": "^0.3.2"
},
"devDependencies": {
"@ethersproject/abstract-provider": "^5.5.1",
"@ethersproject/providers": "^5.5.1",
Copy link
Contributor Author

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",
Copy link
Contributor Author

@markdalgleish markdalgleish May 5, 2022

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>();
Copy link
Contributor Author

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.

Copy link
Contributor

@peduarte peduarte left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lfg

@markdalgleish markdalgleish merged commit 4062169 into main May 5, 2022
@markdalgleish markdalgleish deleted the @markdalgleish/RNBW-3548-ethers-peer branch May 5, 2022 09:24
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

Successfully merging this pull request may close these issues.

None yet

2 participants