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

Reef Knot v2: rework autoconnect and remove legacy #119

Merged
merged 21 commits into from
Mar 4, 2024

Conversation

alx-khramov
Copy link
Contributor

Changes

reef-knot (main package)

  • Release v2.0
  • Re-export @reef-knot/types package

@reef-knot/web3-react

  • Remove legacy code, related to web3-react library, including Web3ReactProvider and ProviderWeb3 context providers. Now, a dApp must use ReefKnot context provider directly.
  • Remove legacy code, related to lido-sdk packages, including ProviderSDK context provider, required for useSDK hook. If a dApp uses lido-sdk and calls useSDK, then the ProviderSDK setup must be moved to this dApp now (you can see an example of such migration in demo-react app in this PR).
  • Remove autoconnect, based on web3-react.
  • Remove constants, connectors, outdated tests and some helpers and hooks.
  • useWeb3, useDisconnect, useConnectorInfo, useConnectorError reworked to work with wagmi and left for backwards compatibility, because some dApps still rely on these hooks.

@reef-knot/core-react

  • Add new reworked autoconnect, based on wagmi and new autoConnectOnly wallet adapters (for Ledger Live, Safe and mobile dApp Browsers)

@reef-knot/ledger-connector

  • Remove legacy web3-react connector for Ledger Live
  • Add Ledger Live connector based on wagmi.
  • Rework Ledger Live detector helper.

@reef-knot/connect-wallet-modal

  • Support autoConnectOnly wallets and minor fixes.

Wallet Adapters

  • Add wallet adapters for Ledger Live, Safe and mobile dApp Browsers. They are marked as autoConnectOnly, which means that they will not be shown in the Wallet Connection Modal. As part of the autoconnect process, there is an attempt to detect each of autoConnectOnly wallets and connect if the detection is successful.

Demo App (apps/demo-react)

  • Remove ProviderWeb3 call, because it is removed from @reef-knot/web3-react. Use ReefKnot context provider directly and setup ProviderSDK separately.
  • Add favicon
  • Add manifest for Safe (gnosis) and setup CORS to allow access to the manifest

Tasks

Resolves SI-1040, SI-1110, SI-1120

@alx-khramov alx-khramov self-assigned this Feb 2, 2024
@alx-khramov alx-khramov requested a review from a team as a code owner February 2, 2024 19:16
Copy link

changeset-bot bot commented Feb 2, 2024

⚠️ No Changeset found

Latest commit: 7a6b67e

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Jeday
Jeday previously approved these changes Feb 5, 2024
packages/wallets/ledger-live/rollup.config.js Show resolved Hide resolved
Copy link
Contributor

@Jeday Jeday left a comment

Choose a reason for hiding this comment

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

LGTM

@alx-khramov alx-khramov merged commit 4687e5c into main Mar 4, 2024
1 check passed
@alx-khramov alx-khramov deleted the feature/wagmi-autoconnect branch March 4, 2024 10:18
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.

4 participants