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

RED-289: Rainbowkit used in GUI is very outdated on 1.0.7 latest is 2.1.6 #47

Open
wants to merge 5 commits into
base: dev
Choose a base branch
from

Conversation

dnlbui
Copy link
Contributor

@dnlbui dnlbui commented Sep 23, 2024

https://linear.app/shm/issue/RED-289/[new-validator-design]-rainbowkit-used-in-gui-is-very-outdated-on-107

resources used:
https://www.rainbowkit.com/docs/migration-guide
https://wagmi.sh/react/guides/migrate-from-v1-to-v2#updated-createconfig-parameters
https://viem.sh/docs/migration-guide.html#_2-x-x-breaking-changes

Summary:
This PR updates related dependencies to rainbowkit upgrade to their latest versions, for compatibility and removing deprecated functions. The changes have been tested locally + w/ WaterNet Dashboard installer and are confirmed to work as expected.

Context:

  • The version of rainbowkit used for connecting wallets was outdated.
  • wagmi and related dependencies needed updates due to deprecations and compatibility issues.
  • tanstack dependencies were required for compilation.

Changes Made:

  1. Dependency Updates:

    • Updated @rainbow-me/rainbowkit from 1.0.7 to 2.1.6.
    • Added @tanstack/query-core version 5.56.2.
    • Added @tanstack/react-query version 5.56.2.
    • Updated viem from 1.3.0 to 2.21.9.
    • Updated wagmi from 1.3.9 to 2.12.12.
  2. Code Adjustments:

    • Modified imports and configurations to align with the updated wagmi and rainbowkit versions.
    • Removed deprecated functions and replaced them with updated implementations.
  3. Testing:

    • Tested locally and verified functionality with the dashboard.
    • Tested using waternet dashboard installer by switching to GUI feature branch after install.
    • Ensured that staking, unstaking, and login/logout work without issues.

The code changes include updating the npm dependencies to their latest versions and fixing the type casting for the Ethereum provider in the StakeForm, useUnstake, and useStake components. The type casting is changed from "ethereum as ExternalProvider" to "ethereum as unknown as ExternalProvider" to address a type error.
…cludes Wagmi's createConfig and replaces getDefaultWallets and connectorsForWallets
@dnlbui dnlbui marked this pull request as ready for review September 25, 2024 14:56
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.

1 participant