> ## Documentation Index
> Fetch the complete documentation index at: https://docs.dynamic.xyz/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# isHardwareWalletAccount

> Check if a wallet account was connected via a hardware wallet

Checks whether a wallet account was connected via a hardware wallet (e.g., a Ledger device). Use this
to display hardware wallet indicators in your UI or apply hardware-wallet-specific logic.

## Usage

```javascript theme={"system"}
import { isHardwareWalletAccount, getPrimaryWalletAccount } from '@dynamic-labs-sdk/client';

const walletAccount = getPrimaryWalletAccount();

if (walletAccount && isHardwareWalletAccount({ walletAccount })) {
  console.log('Connected via hardware wallet');
  console.log('Vendor:', walletAccount.hardwareWalletVendor); // 'ledger'
}
```

## Parameters

| Parameter       | Type            | Description                   |
| --------------- | --------------- | ----------------------------- |
| `walletAccount` | `WalletAccount` | The wallet account to inspect |

## Returns

`boolean` — `true` if the wallet account was connected via a hardware wallet, `false` otherwise.

When `true`, the account's `hardwareWalletVendor` field is set to the vendor name (e.g., `'ledger'`).

## Examples

### Check primary wallet

```javascript theme={"system"}
import {
  isHardwareWalletAccount,
  getPrimaryWalletAccount,
} from '@dynamic-labs-sdk/client';

const walletAccount = getPrimaryWalletAccount();

if (walletAccount) {
  const isHardware = isHardwareWalletAccount({ walletAccount });
  console.log('Hardware wallet:', isHardware);
}
```

### Filter hardware wallet accounts

```javascript theme={"system"}
import {
  isHardwareWalletAccount,
  getWalletAccounts,
} from '@dynamic-labs-sdk/client';

const allAccounts = getWalletAccounts();

const hardwareAccounts = allAccounts.filter((account) =>
  isHardwareWalletAccount({ walletAccount: account })
);

console.log('Hardware wallet accounts:', hardwareAccounts.length);
```

### Display hardware wallet badge

```javascript theme={"system"}
import { isHardwareWalletAccount } from '@dynamic-labs-sdk/client';

const renderAccountLabel = (walletAccount) => {
  const isHardware = isHardwareWalletAccount({ walletAccount });
  const label = isHardware
    ? `${walletAccount.address} (${walletAccount.hardwareWalletVendor})`
    : walletAccount.address;

  console.log('Account label:', label);
};
```

## React

`isHardwareWalletAccount` is synchronous and works the same in React. Use it to display hardware wallet indicators in your wallet list:

```tsx theme={"system"}
import { isHardwareWalletAccount } from '@dynamic-labs-sdk/client';
import { useGetWalletAccounts } from '@dynamic-labs-sdk/react-hooks';

function WalletList() {
  const { data: walletAccounts = [] } = useGetWalletAccounts();

  return (
    <ul>
      {walletAccounts.map((account) => (
        <li key={account.address}>
          {account.address}
          {isHardwareWalletAccount({ walletAccount: account }) && (
            <span> ({account.hardwareWalletVendor} hardware wallet)</span>
          )}
        </li>
      ))}
    </ul>
  );
}
```

## Related functions

* [canConnectWithHardwareWallet](/javascript/reference/client/can-connect-with-hardware-wallet) - Check if a provider supports a hardware wallet vendor
* [getWalletAccounts](/javascript/reference/wallets/get-wallet-accounts) - Get all connected wallet accounts
* [Hardware Wallet Support](/javascript/reference/wallets/hardware-wallets) - Overview of hardware wallet support
