Skip to content

Unhandled Runtime Error - TypeError: setVisible is not a function (WalletMultiButton) #85

@GageBachik

Description

@GageBachik

Describe the bug
Currently clicking on the select wallet modal button returns setVisible is not a function in a nextjs app.

To Reproduce
Steps to reproduce the behavior:

  1. Download the repo at https://github.com/solana-labs/wallet-adapter/tree/master/packages/starter/nextjs-starter
  2. Add these two lines to index.tsx
import { useWallet } from "@solana/wallet-adapter-react";
import { WalletMultiButton } from "@solana/wallet-adapter-react-ui";
  1. Add a simple modal button to the page:
const wallet = useWallet();
  if (!wallet.connected) {
    /* If the user's wallet is not connected, display connect wallet button. */
    return (
      <div
        style={{
          display: "flex",
          justifyContent: "center",
          marginTop: "100px",
        }}
      >
        <WalletMultiButton />
      </div>
    );
  }
  1. Click it

Expected behavior
Should allow me to select a wallet of my choice

Screenshots
image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions