Skip to content

Commit 6572453

Browse files
authored
Merge branch 'main' into ew-builder-angular
2 parents 097464a + 1486f6d commit 6572453

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

sdk/connect/react-native.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -176,12 +176,12 @@ For example:
176176
import { useSDK } from "@metamask/sdk-react"
177177

178178
function App() {
179-
const { connect, terminate, account, chainId, ethereum } = useSDK()
179+
const { account, chainId, ethereum, sdk } = useSDK()
180180

181181
// Connect to MetaMask
182182
const connectWallet = async () => {
183183
try {
184-
await connect()
184+
await sdk?.connect()
185185
} catch (error) {
186186
console.error("Failed to connect wallet:", error)
187187
}
@@ -196,7 +196,7 @@ function App() {
196196

197197
// Disconnect wallet
198198
const disconnectWallet = async () => {
199-
await terminate()
199+
await sdk?.terminate()
200200
}
201201

202202
return (

0 commit comments

Comments
 (0)