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

Update to support WAGMI v2 #18

Merged
merged 9 commits into from
Mar 22, 2024
Merged

Update to support WAGMI v2 #18

merged 9 commits into from
Mar 22, 2024

Conversation

jamesrp13
Copy link
Collaborator

What kind of change does this PR introduce? (Bug fix, feature, docs update, ...)

This PR introduces a feature update to support wagmi v2 for our existing connectors. The upgrade aligns our connectors with the latest wagmi standards, ensuring compatibility and leveraging the new functionalities introduced in wagmi v2.

What is the current behavior? (You can also link to an open issue here)

Currently, our connectors are based on the previous version of wagmi, which may lead to compatibility issues with projects that have migrated to wagmi v2. The existing implementation might not fully support the new API and functionalities introduced in wagmi v2, potentially causing type errors and limitations in functionality.

What is the new behavior (if this is a feature change)?

With this PR, our connectors are now fully compatible with wagmi v2. This includes the following enhancements:

Adoption of wagmi v2's new connector configuration pattern.
Improved type definitions to eliminate type errors and better align with wagmi v2's expected connector properties and methods.
Support for new wagmi v2 features such as chain switching, enhanced event handling, and optimized connection management.
The upgrade ensures that our connectors can seamlessly integrate with wagmi v2, providing a robust and flexible connection mechanism for decentralized applications.

Other information:

In this upgrade, we followed the official wagmi guide for creating connectors. This involved modifying the createConnector method to include the required properties and methods, such as id, name, connect, disconnect, getAccounts, getChainId, getProvider, isAuthorized, setup, switchChain, onAccountsChanged, onChainChanged, onConnect, onDisconnect, and onMessage.

Additionally, we leveraged wagmi v2's config properties such as chains, emitter, and storage to enhance the functionality and flexibility of our connectors. This upgrade not only addresses the compatibility issues but also enriches our connectors with the advanced capabilities of wagmi v2.

@joshuascan joshuascan merged commit 5d4d39d into main Mar 22, 2024
1 check failed
@joshuascan joshuascan deleted the feat/wagmi-v2 branch March 22, 2024 20:33
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

4 participants