Skip to content
This repository was archived by the owner on Jul 30, 2025. It is now read-only.
This repository was archived by the owner on Jul 30, 2025. It is now read-only.

useWallet() return value undefine #857

@moran666666

Description

@moran666666

Url

https://aptos.dev/en/build/sdks/wallet-adapter/dapp#import-usewallet-in-files-where-you-want-to-access-data-from-the-provider

Describe the content issue

import { useWallet } from "@aptos-labs/wallet-adapter-react";
 
// Access fields / functions from the adapter
const { account, connected, wallet, changeNetwork } = useWallet();

I wrote it according to the tutorial, why { account, connected, wallet, changeNetwork } only connected is false and other are undefine?(My chrome brower have "Petra" and "OKXWallet" plug-in)

Section

sdks

Metadata

Metadata

Assignees

No one assigned

    Labels

    StaledocumentationImprovements or additions to documentationsdksAll content under https://aptos.dev/en/build/sdks

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions