Skip to content

[WIP] feat: multichain support #338

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

Draft
wants to merge 46 commits into
base: feat/onramp
Choose a base branch
from
Draft

Conversation

ignaciosantise
Copy link
Collaborator

@ignaciosantise ignaciosantise commented May 8, 2025

Summary

Enable support for multiple chains to AppKit React Native

⚠️ Notice:
packages/appkit is a copy of scaffold, so you'll see a lot of "new code" but you can discard that.

📁 Important files:

  • packages/appkit/src/AppKit.ts -> Centralizes general logic. Handles the connections, adapters, subscribes to adapter events to update controllers

  • packages/appkit/src/connectors/WalletConnectConnector.ts -> Connector that uses Universal Provider internally

  • packages/core/src/controllers/ConnectionsController.ts -> This is the most important Controller, which replaces AccountController and NetworkController. It contains all connections related data. It also has a derived state to make things easier

  • packages/solana/src/adapter.ts -> Basic adapter for Solana

  • packages/ethers/src/adapter.ts -> Basic adapter for EVM connections using Ethers

  • packages/bitcoin/src/adapter.ts -> Basic adapter for Bitcoin

  • packages/appkit/src/AppKitContext.tsx -> The instance of AppKit is saved on a context, so the view can access it and execute methods. So now instead of views calling controller methods directly, its all centralized in AppKit.

    • disconnection logic -> packages/appkit/src/views/w3m-account-default-view/index.tsx calls AppKit disconnect instead of clearing controllers, etc.
  • packages/common/src/utils/TypeUtil.ts -> This file contains the new abstractions for Connectors, Adapters and Providers.

  • packages/appkit/src/modal/w3m-account-button/index.tsx -> Example on how to get active network and active address

📚 Related resources

Copy link

changeset-bot bot commented May 8, 2025

🦋 Changeset detected

Latest commit: b3eed6e

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 16 packages
Name Type
@reown/appkit-scaffold-utils-react-native Major
@reown/appkit-bitcoin-react-native Major
@reown/appkit-ethers5-react-native Major
@reown/appkit-react-native Major
@reown/appkit-common-react-native Major
@reown/appkit-ethers-react-native Major
@reown/appkit-solana-react-native Major
@reown/appkit-wagmi-react-native Major
@reown/appkit-core-react-native Major
@reown/appkit-siwe-react-native Major
@reown/appkit-ui-react-native Major
@reown/appkit-auth-ethers-react-native Major
@reown/appkit-auth-wagmi-react-native Major
@reown/appkit-coinbase-ethers-react-native Major
@reown/appkit-coinbase-wagmi-react-native Major
@reown/appkit-wallet-react-native Major

Not sure what this means? Click here to learn what changesets are.

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

Copy link

socket-security bot commented May 8, 2025

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Added@​reown/​appkit-react-native@​1.2.3100100100100100

View full report

@ignaciosantise ignaciosantise changed the base branch from develop to feat/onramp May 8, 2025 15:10
Copy link
Contributor

Published pre-release version: 0.0.0-canary-20250513154354

Copy link

Quality Gate Failed Quality Gate failed

Failed conditions
C Reliability Rating on New Code (required ≥ B)

See analysis details on SonarQube Cloud

Catch issues before they fail your Quality Gate with our IDE extension SonarQube for IDE

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