Manage Wallet List

To remove or include specific wallets from the SDK, you can use the callback prop:

walletsFilter: (wallets: WalletOptions[]) => WalletOptions[]

Example to filter Wallets out

import { DynamicContextProvider, normalizeWalletName } from ‘@dynamic-labs/sdk-react’;

// Note that you should use the normalized name of the wallet
// see code snippet below for finding the normalized wallet name
const FILTER_WALLET = ['wallet1', 'wallet2']
    
<DynamicContextProvider
  settings={{
    walletsFilter: ((wallets) => wallets.filter((wallet) =>             
      !FILTER_WALLETS.includes(normalizeWalletName(wallet.name)))),
  }}
>    

Fetch standardized wallet names

To find the normalized name of all the wallets you can output all the names using the following syntax:

import { useDynamicContext, normalizeWalletName } from ‘@dynamic-labs/sdk-react’;

const { wallets } = useDynamicContext();
console.log(wallets.map((wallet) => normalizeWalletName(wallet.name)));          

Did this page help you?