【问题标题】:How do I get the address of the connected wallet with @walletconnect/react-native-dapp?如何使用@walletconnect/react-native-dapp 获取已连接钱包的地址?
【发布时间】:2022-10-22 17:21:32
【问题描述】:

我需要使用@walletconnect/react-native-dapp 获取元掩码的地址

【问题讨论】:

  • 显示您的代码以及您已经尝试过的内容。

标签: react-native blockchain ethereum wallet wallet-connect


【解决方案1】:

下面是获取钱包地址的示例代码:

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

【讨论】:

    猜你喜欢
    • 2022-01-08
    • 2022-01-23
    • 2021-11-28
    • 2021-08-08
    • 2022-11-09
    • 1970-01-01
    • 2014-05-26
    • 2022-06-30
    • 2022-11-15
    相关资源
    最近更新 更多