Skip to content

Merge packages, introduce skins, update tooling - #400

Open
alx-khramov wants to merge 50 commits into
developfrom
feature/si-1647-merge-packages
Open

alx-khramov wants to merge 50 commits into
developfrom
feature/si-1647-merge-packages

Conversation

@alx-khramov

Copy link
Copy Markdown
Contributor

Resolves SI-993, SI-1005, SI-990, SI-1647

This PR prepares Reef Knot v9 by separating wallet connection behavior from its UI. Applications can use a ready-made UI skin, replace individual views, or build a custom interface using the public headless API.

  • Consolidates providers, configuration, wallet catalogs and connection logic into reef-knot, removing its dependencies on Lido UI, styled-components and CSS.
  • Adds @reef-knot/ui-lido-legacy for the existing appearance and @reef-knot/ui-lido for Lido App UI.
  • Exposes shared headless hooks for wallet discovery, Terms, connection, EIP-6963 and Ledger, with replaceable modal components.
  • Introduces useConnectionFlow().startConnection() and deprecates useConnect().connect().
  • Updates demo-react to demonstrate Legacy, Lido App UI and Custom interfaces using one provider stack.
  • Improves connection error screens and picker UX, prevents stale connection errors after cancellation, and preserves the Ledger accounts screen during connector handoff.
  • Updates the build and lint tooling, standardizes package type checks on TypeScript 7, and adds migration guides for 0.x → latest and 8.x → 9.

BREAKING CHANGE: Removes reef-knot/* subpath imports and root namespace exports. Visual APIs move to the UI skin packages. Removes the legacy web3-react layer, including useWeb3 and useSupportedChains, as well as buttonComponentsByConnectorId, wallet-specific Connect* components and linkDontHaveWallet. Wallet adapter types move from @reef-knot/types to @reef-knot/wallets-helpers.
Validation: yarn check-packages passes, covering TypeScript, lint and tests. Both UI skins share scenario tests, with additional regression coverage for cancelled connections, Ledger transport handoff and icon stability.

Signed-off-by: Alexander K <alexander.k@lido.fi>
Extract wallet connection logic into public headless hooks.
Add legacy and Lido App UI skins with replaceable view components.
Introduce useConnectionFlow and deprecate useConnect.

BREAKING CHANGE: Visual exports move from reef-knot to
@reef-knot/ui-lido-legacy and @reef-knot/ui-lido.
Remove buttonComponentsByConnectorId and wallet-specific Connect*
components; use components overrides or headless hooks instead.

Signed-off-by: Alexander K <alexander.k@lido.fi>
Signed-off-by: Alexander K <alexander.k@lido.fi>
Signed-off-by: Alexander K <alexander.k@lido.fi>
Signed-off-by: Alexander K <alexander.k@lido.fi>
Signed-off-by: Alexander K <alexander.k@lido.fi>
Signed-off-by: Alexander K <alexander.k@lido.fi>
Signed-off-by: Alexander K <alexander.k@lido.fi>
Signed-off-by: Alexander K <alexander.k@lido.fi>
Signed-off-by: Alexander K <alexander.k@lido.fi>
Signed-off-by: Alexander K <alexander.k@lido.fi>
Signed-off-by: Alexander K <alexander.k@lido.fi>
Signed-off-by: Alexander K <alexander.k@lido.fi>
@alx-khramov alx-khramov self-assigned this Oct 13, 2026
@alx-khramov
alx-khramov requested a review from a team as a code owner October 13, 2026 10:11
Signed-off-by: Alexander K <alexander.k@lido.fi>
Signed-off-by: Alexander K <alexander.k@lido.fi>
Signed-off-by: Alexander K <alexander.k@lido.fi>
Use native copy entries so styles and assets are watched, including files outside the import graph.

Signed-off-by: Alexander K <alexander.k@lido.fi>
Reject mismatched chain IDs before signing or accessing the device.

Signed-off-by: Alexander K <alexander.k@lido.fi>
Wallet replacement used to call disconnect() without waiting for it, so
wagmi could write recentConnectorId after the new connection had already
saved its own keys.

Signed-off-by: Alexander K <alexander.k@lido.fi>
Signed-off-by: Alexander K <alexander.k@lido.fi>
Signed-off-by: Alexander K <alexander.k@lido.fi>
Signed-off-by: Alexander K <alexander.k@lido.fi>
Signed-off-by: Alexander K <alexander.k@lido.fi>
Prevent earlier connections from becoming active again, and clear reconnect storage even when a wallet fails to disconnect.

Signed-off-by: Alexander K <alexander.k@lido.fi>
Prevent injected connectors from falling back to another wallet’s
window.ethereum, and allow auto-reconnect to catch late announcements.

Signed-off-by: Alexander K <alexander.k@lido.fi>
Signed-off-by: Alexander K <alexander.k@lido.fi>
Keep closed overlays from blocking clicks, focus, and scroll, even when untyped callers pass removed transition options.

Signed-off-by: Alexander K <alexander.k@lido.fi>
Signed-off-by: Alexander K <alexander.k@lido.fi>
Store wallet IDs directly and verify both saved keys before reconnecting,
including after waiting for late EIP-6963 provider announcements.

Signed-off-by: Alexander K <alexander.k@lido.fi>
Jeday
Jeday previously approved these changes Oct 19, 2026
Avoids interfering with a manual connection already in progress.

Signed-off-by: Alexander K <alexander.k@lido.fi>
Look up providers on each request so wallets announced after target creation are available.

Signed-off-by: Alexander K <alexander.k@lido.fi>
Jeday
Jeday previously approved these changes Oct 20, 2026
Signed-off-by: Alexander K <alexander.k@lido.fi>
Suppress user-rejection errors and show readable fallback messages for malformed wallet errors.

Signed-off-by: Alexander K <alexander.k@lido.fi>
Show Back in the header and make Close dismiss all connection screens.
Keep rejected wallet requests in the picker without displaying an error.

Signed-off-by: Alexander K <alexander.k@lido.fi>
Let Ledger views control their own width to prevent the container clamp from shifting them off center.

Signed-off-by: Alexander K <alexander.k@lido.fi>
Replace technical wallet errors with guidance to approve or reject the
request already open in the wallet.

Signed-off-by: Alexander K <alexander.k@lido.fi>
Signed-off-by: Alexander K <alexander.k@lido.fi>
Signed-off-by: Alexander K <alexander.k@lido.fi>
Signed-off-by: Alexander K <alexander.k@lido.fi>
Signed-off-by: Alexander K <alexander.k@lido.fi>
Signed-off-by: Alexander K <alexander.k@lido.fi>
Separate returning to the previous screen from closing the entire modal flow, and clarify connection outcomes with the `connected` result field.

Signed-off-by: Alexander K <alexander.k@lido.fi>
Pin and restore the page scroll position on touch devices, and contain
overscroll within modal content.

Signed-off-by: Alexander K <alexander.k@lido.fi>
Signed-off-by: Alexander K <alexander.k@lido.fi>
Signed-off-by: Alexander K <alexander.k@lido.fi>
Signed-off-by: Alexander K <alexander.k@lido.fi>

This branch was successfully deployed

1 active deployment
preview — 2d26ba18 Deployed Nov 5, 2026 by alx-khramov via check-all #38
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.

2 participants