> ## 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.

# Checking Sui Wallet Account Type

# Checking Sui Wallet Account Type

When working with multiple blockchain types, you may need to check if a wallet account is specifically a Sui wallet account. The `isSuiWalletAccount` type guard function helps you narrow down the type safely.

## Usage

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

const walletAccount = getPrimaryWalletAccount();

if (walletAccount && isSuiWalletAccount(walletAccount)) {
  // walletAccount is now typed as SuiWalletAccount
  console.log('Sui address:', walletAccount.address);
}
```

## Parameters

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

## Returns

`boolean` - Returns `true` if the wallet account is a Sui wallet account, `false` otherwise. Also acts as a TypeScript type guard, narrowing the type to `SuiWalletAccount`.

## React

`isSuiWalletAccount` is a synchronous type guard that works the same in React. Use it to filter wallet accounts reactively:

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

function SuiWalletDisplay() {
  const { data: walletAccounts = [] } = useGetWalletAccounts();
  const suiAccount = walletAccounts.find(isSuiWalletAccount);

  if (!suiAccount) return <p>No Sui wallet connected</p>;
  return <p>Sui address: {suiAccount.address}</p>;
}
```

## Related functions

* [getSuiClient](/javascript/reference/sui/get-sui-client) - Get the Sui client from a wallet account
