Skip to content

Update react-native.md #2225

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Conversation

Halleys123
Copy link

useSDK is now modified and connect, terminate options have moved to sdk object inside useSDK function

Description

This PR updates the usage of useSDK from @metamask/sdk-react to reflect the recent API change where connect and terminate methods have moved inside the sdk object returned by useSDK.

Changes made:

Updated destructuring from:
const { connect, terminate, account, chainId, ethereum } = useSDK()

to:

const { account, chainId, ethereum, sdk } = useSDK()
  • Updated wallet connection logic from await connect() to await sdk?.connect().
  • Updated wallet disconnection logic from await terminate() to await sdk?.terminate().

useSDK is now modified and connect, terminate options have moved to sdk object inside useSDK function
@Halleys123 Halleys123 requested review from a team as code owners August 12, 2025 18:55
Copy link

vercel bot commented Aug 12, 2025

@Halleys123 is attempting to deploy a commit to the Consensys Team on Vercel.

A member of the Team first needs to authorize it.

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