Using the Solana Wallet Adapter

If your dApp uses the Solana Wallet Adapterarrow-up-right, you just have to add the Solflare Wallet Adapter to the list of supported wallets.

Install the latest wallets package with

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

Then update the code to look like this:

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

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

Then update the code:

Last updated

Was this helpful?