user19686917
user19686917

Reputation: 17

How do I get the address of the connected wallet with @walletconnect/react-native-dapp?

I need to get the addres of metamask using @walletconnect/react-native-dapp

Upvotes: 0

Views: 1350

Answers (1)

Vineeta
Vineeta

Reputation: 115

Below is sample code to fetch wallet address:

import { useWalletConnect } from "@walletconnect/react-native-dapp";

export default function fetchWalletAddress() {
  const connector = useWalletConnect();
  const walletAddress= connector.accounts[0]
}

https://docs.walletconnect.com/quick-start/dapps/react-native

Upvotes: 2

Related Questions