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

Issue 487 #528

Open
wants to merge 7 commits into
base: main
Choose a base branch
from
Open

Conversation

armandocodecr
Copy link

Description - Resolves #487

This pull request introduces significant updates and improvements to our project by migrating to the latest versions of wagmi and rainbowkit. This migration was essential to address a bug related to outdated dependencies and to enable support for Rabby Wallet, which was not available in the previously used versions.

Key Changes:

  1. Migration to wagmi and rainbowkit v2:

    • Updated wagmi and rainbowkit to their latest versions as per RainbowKit's guide.
    • Required due to the deprecation of WalletConnect v1, which was shut down in June 2023.
  2. Addition of Rabby Wallet:

    • Integrated support for Rabby Wallet by updating the configuration to use the new connectorsForWallets function.
  3. Configuration Changes:

    • Created walletConfig.ts to centralize wallet configurations, including the project ID for WalletConnect.
    • Updated .env.local and .env.production with VITE_WALLETCONNECT_CLOUD_ID, required for the WalletConnect integration. A test project ID was used, but a permanent one should be created via WalletConnect Cloud.
  4. Component Updates:

    • final-preview-step.tsx:
      • Replaced useSigner with useAccount and getWalletClient.
      • Adjusted the creation of the group to align with the new wallet handling logic.
    • add-member-modal.tsx:
      • Replaced useSigner with useAccount and getWalletClient.
      • Updated member addition logic to comply with the latest API changes.
  5. Context Update:

    • AuthContextProvider:
      • Migrated from deprecated API usage to the latest context configuration with WagmiProvider and configWallets.
      • Integrated QueryClientProvider from @tanstack/react-query.
  6. Dependency Updates:

    • Updated several dependencies in package.json for compatibility with the latest wagmi and rainbowkit.

References:

Related Issue

This PR addresses issues with outdated wallet integrations and resolves compatibility problems due to the shutdown of WalletConnect v1.

Issue link: Issue #487

Does this introduce a breaking change?

  • Yes
  • No

Breaking Change Details:

  • New API Usage: The updated versions of wagmi and rainbowkit require new APIs (useAccount, getWalletClient). Ensure that all parts of the project are updated accordingly.
  • WalletConnect Project ID: A valid project ID must be obtained and set in .env.local and .env.production for WalletConnect to function correctly.
  • Wallet Configuration: Configuration for wallets is now centralized in walletConfig.ts. Review and test the new setup thoroughly.

Other information

Migration Note:

  • Project ID: A project ID for WalletConnect Cloud must be obtained and set in .env.local and .env.production under the variable VITE_WALLETCONNECT_CLOUD_ID. The current setup uses a test ID which should be replaced with a valid project-specific ID.
  • WalletConnect v1 Shutdown: The migration ensures compliance with the transition from WalletConnect v1 to v2, aligning with industry standards and maintaining connection capabilities.

Component Changes Summary:

  • Before and After:
    • final-preview-step.tsx:
      • Before: Used deprecated methods for wallet connection and signer retrieval.
      • After: Updated to use useAccount and getWalletClient from wagmi.
    • add-member-modal.tsx:
      • Before: Utilized outdated API for signer handling.
      • After: Modified to use the latest wagmi API for wallet connection.

These updates ensure the project is compatible with the latest standards and libraries, enhancing security, functionality, and maintainability.

Copy link

vercel bot commented Jun 17, 2024

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

Name Status Preview Comments Updated (UTC)
bandada-docs ❌ Failed (Inspect) Jun 17, 2024 6:12am
bandada-website ❌ Failed (Inspect) Jun 17, 2024 6:12am

@vplasencia
Copy link
Member

Hey @armandocodecr! So sorry for the late reply and thank you very much for the PR 🙏.

I think there are some errors when running yarn && yarn build. Can you see them?

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.

Can't connect with Wallet Connect or Coinbase Wallet using the openConnectModal
2 participants