# Using the Solana Wallet Adapter

If your dApp uses the [Solana Wallet Adapter](https://github.com/solana-labs/wallet-adapter), you just have to add the Solflare Wallet Adapter to the list of supported wallets.

\
Install the latest *wallets* package with

```sh
npm install @solana/wallet-adapter-wallets@latest
```

Then update the code to look like this:

```javascript
import {
  SolflareWalletAdapter,
  /* ... other adapters ... */
} from '@solana/wallet-adapter-wallets';

const wallets = useMemo(
  () => [
    new SolflareWalletAdapter(),
    // ... other adapters ...
  ],
  []
);

<WalletProvider autoConnect wallets={wallets}>
```

\
Alternatively, you can install only the Solflare adapter directly

```sh
npm install @solana/wallet-adapter-solflare@latest
```

Then update the code:

```javascript
import { SolflareWalletAdapter } from '@solana/wallet-adapter-solflare';
import { /* ... other adapters ... */ } from '@solana/wallet-adapter-wallets';


const wallets = useMemo(
  () => [
    new SolflareWalletAdapter(),
    // ... other adapters ...
  ],
  []
);

<WalletProvider autoConnect wallets={wallets}>
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.solflare.com/solflare/technical/integrate-solflare/using-the-solana-wallet-adapter.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
