Skip to content

Update react-native.md#2225

Merged
shahbaz17 merged 2 commits intoMetaMask:mainfrom
Halleys123:patch-1
Sep 9, 2025
Merged

Update react-native.md#2225
shahbaz17 merged 2 commits intoMetaMask:mainfrom
Halleys123:patch-1

Conversation

@Halleys123
Copy link
Contributor

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
@vercel
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.

@shahbaz17 shahbaz17 requested review from a team as code owners September 9, 2025 10:20
@vercel
Copy link

vercel bot commented Sep 9, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
metamask-docs Ready Ready Preview Comment Sep 9, 2025 10:33am

Copy link
Member

@shahbaz17 shahbaz17 left a comment

Choose a reason for hiding this comment

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

LGTM

Thank you for your contribution, @Halleys123

@shahbaz17 shahbaz17 merged commit 1486f6d into MetaMask:main Sep 9, 2025
19 checks passed
alexandratran pushed a commit that referenced this pull request Sep 10, 2025
useSDK is now modified and connect, terminate options have moved to sdk object inside useSDK function

Co-authored-by: Mohammad Shahbaz Alam <shahbaz17@users.noreply.github.com>
alexandratran added a commit that referenced this pull request Sep 15, 2025
* Fix typos

Co-authored-by: AyushBherwani1998 <“ayush.bherwani1998@gmail.com”>

* Update react-native.md (#2225)

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

Co-authored-by: Mohammad Shahbaz Alam <shahbaz17@users.noreply.github.com>

* Add DTK tutorial for creating an invite link

* Edit the Angular SDK content. (#2287)

Signed-off-by: bgravenorst <byron.gravenorst@consensys.net>

* Fix deeplink urls (#2293)

* Edit the embedded wallets React builder component. (#2292)

* Edit the React builder component.

Signed-off-by: bgravenorst <byron.gravenorst@consensys.net>

* Typo.

Signed-off-by: bgravenorst <byron.gravenorst@consensys.net>

---------

Signed-off-by: bgravenorst <byron.gravenorst@consensys.net>

* update tutorial

* Add DTK tutorial for creating an invite link

* Update react-native.md (#2225)

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

Co-authored-by: Mohammad Shahbaz Alam <shahbaz17@users.noreply.github.com>

* Edit the Angular SDK content. (#2287)

Signed-off-by: bgravenorst <byron.gravenorst@consensys.net>

* Fix deeplink urls (#2293)

* update tutorial

* Edit the embedded wallets React builder component. (#2292)

* Edit the React builder component.

Signed-off-by: bgravenorst <byron.gravenorst@consensys.net>

* Typo.

Signed-off-by: bgravenorst <byron.gravenorst@consensys.net>

---------

Signed-off-by: bgravenorst <byron.gravenorst@consensys.net>

* add wagmi step and adjust headings

* address reviewer comments

* address reviewer comments

* minor edits

---------

Signed-off-by: bgravenorst <byron.gravenorst@consensys.net>
Co-authored-by: Ayush Bherwani <ayush.bherwani1998@gmail.com>
Co-authored-by: AyushBherwani1998 <“ayush.bherwani1998@gmail.com”>
Co-authored-by: Arnav Chhabra <65032719+Halleys123@users.noreply.github.com>
Co-authored-by: Mohammad Shahbaz Alam <shahbaz17@users.noreply.github.com>
Co-authored-by: Byron Gravenorst <50852695+bgravenorst@users.noreply.github.com>
AyushBherwani1998 added a commit that referenced this pull request Sep 18, 2025
* Add delegation scopes guide 

* add delegation scopes guide

* minor edits and rename files

* add delegation scopes to manual sidebar

* restructure and edit

* edit to include scopes in guides

* address reviewer comments

---------

Co-authored-by: “AyushBherwani1998” <“ayush.bherwani1998@gmail.com”>
Co-authored-by: Alexandra Tran <alexandratran@protonmail.com>

* Update dtk tutorial for v0.13

* Update creating delegation references for v0.13

* Minor DTK fixes (#2277)

* Minor DTK fixes

* Apply suggestions from code review

Co-authored-by: Ayush Bherwani <ayush.bherwani1998@gmail.com>

---------

Co-authored-by: Ayush Bherwani <ayush.bherwani1998@gmail.com>

* Fix broken links (#2278)

* update execute on smart accounts behalf guide

* add parameters in delegation scopes

* update reference docs

* update guide: execute-on-smart-accounts-behalf

* Apply suggestions from code review

Co-authored-by: Alexandra Carrillo <12214231+alexandratran@users.noreply.github.com>

---------

Co-authored-by: Alexandra Carrillo <12214231+alexandratran@users.noreply.github.com>
Co-authored-by: AyushBherwani1998 <“ayush.bherwani1998@gmail.com”>

* Update caveats to use new declarative format

* update execution modes

* update parametes of caveats to new caveat configs

* update caveats api reference to new declarative format

* Apply suggestions from code review

Co-authored-by: Alexandra Carrillo <12214231+alexandratran@users.noreply.github.com>

* improve docs

---------

Co-authored-by: AyushBherwani1998 <“ayush.bherwani1998@gmail.com”>
Co-authored-by: Alexandra Carrillo <12214231+alexandratran@users.noreply.github.com>

* Adds guide: Check the delegation state 

* add check delegation state guide

* fix typos

* minor edits

---------

Co-authored-by: AyushBherwani1998 <“ayush.bherwani1998@gmail.com”>
Co-authored-by: Alexandra Tran <alexandratran@protonmail.com>

* Adds guide: Constrain a scope

* add constrain a scope documentation

* edit guide and fix links

* minor edits

---------

Co-authored-by: AyushBherwani1998 <“ayush.bherwani1998@gmail.com”>
Co-authored-by: Alexandra Tran <alexandratran@protonmail.com>

* Update reference section

* restructure reference docs

* add support for caveat enforcer client reference

* add delegation api index page, fix links, adjust toc style

* revert toc code font size

---------

Co-authored-by: AyushBherwani1998 <“ayush.bherwani1998@gmail.com”>
Co-authored-by: Alexandra Tran <alexandratran@protonmail.com>

* Update docs to use signer 

* update to use signer

* revert the ref changes

* apply reviewer suggestion

Co-authored-by: Alexandra Carrillo <12214231+alexandratran@users.noreply.github.com>

---------

Co-authored-by: AyushBherwani1998 <“ayush.bherwani1998@gmail.com”>
Co-authored-by: Alexandra Carrillo <12214231+alexandratran@users.noreply.github.com>

* Add DTK tutorial for creating an invite link (#2289)

* Fix typos

Co-authored-by: AyushBherwani1998 <“ayush.bherwani1998@gmail.com”>

* Update react-native.md (#2225)

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

Co-authored-by: Mohammad Shahbaz Alam <shahbaz17@users.noreply.github.com>

* Add DTK tutorial for creating an invite link

* Edit the Angular SDK content. (#2287)

Signed-off-by: bgravenorst <byron.gravenorst@consensys.net>

* Fix deeplink urls (#2293)

* Edit the embedded wallets React builder component. (#2292)

* Edit the React builder component.

Signed-off-by: bgravenorst <byron.gravenorst@consensys.net>

* Typo.

Signed-off-by: bgravenorst <byron.gravenorst@consensys.net>

---------

Signed-off-by: bgravenorst <byron.gravenorst@consensys.net>

* update tutorial

* Add DTK tutorial for creating an invite link

* Update react-native.md (#2225)

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

Co-authored-by: Mohammad Shahbaz Alam <shahbaz17@users.noreply.github.com>

* Edit the Angular SDK content. (#2287)

Signed-off-by: bgravenorst <byron.gravenorst@consensys.net>

* Fix deeplink urls (#2293)

* update tutorial

* Edit the embedded wallets React builder component. (#2292)

* Edit the React builder component.

Signed-off-by: bgravenorst <byron.gravenorst@consensys.net>

* Typo.

Signed-off-by: bgravenorst <byron.gravenorst@consensys.net>

---------

Signed-off-by: bgravenorst <byron.gravenorst@consensys.net>

* add wagmi step and adjust headings

* address reviewer comments

* address reviewer comments

* minor edits

---------

Signed-off-by: bgravenorst <byron.gravenorst@consensys.net>
Co-authored-by: Ayush Bherwani <ayush.bherwani1998@gmail.com>
Co-authored-by: AyushBherwani1998 <“ayush.bherwani1998@gmail.com”>
Co-authored-by: Arnav Chhabra <65032719+Halleys123@users.noreply.github.com>
Co-authored-by: Mohammad Shahbaz Alam <shahbaz17@users.noreply.github.com>
Co-authored-by: Byron Gravenorst <50852695+bgravenorst@users.noreply.github.com>

* revert the ew changes

* revert ew change

* v0.13 changes 

* v0.13 changes

* Apply suggestions from code review

Co-authored-by: Alexandra Carrillo <12214231+alexandratran@users.noreply.github.com>

---------

Co-authored-by: Ayush Bherwani <“ayush.bherwani1998@gmail.com”>
Co-authored-by: Alexandra Carrillo <12214231+alexandratran@users.noreply.github.com>

* minor edits

* remove todo

* use disallows instead of disables

* remove 7715 card from intro page

* improve delegation scope ref description

* add getMultiTokenPeriodEnforcerAvailableAmount action

---------

Signed-off-by: bgravenorst <byron.gravenorst@consensys.net>
Co-authored-by: “AyushBherwani1998” <“ayush.bherwani1998@gmail.com”>
Co-authored-by: Alexandra Tran <alexandratran@protonmail.com>
Co-authored-by: Alexandra Carrillo <12214231+alexandratran@users.noreply.github.com>
Co-authored-by: Arnav Chhabra <65032719+Halleys123@users.noreply.github.com>
Co-authored-by: Mohammad Shahbaz Alam <shahbaz17@users.noreply.github.com>
Co-authored-by: Byron Gravenorst <50852695+bgravenorst@users.noreply.github.com>
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

Comments