> ## 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 Tron Wallet Account Type

# Checking Tron Wallet Account Type

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

## Usage

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

const walletAccount = getPrimaryWalletAccount();

if (walletAccount && isTronWalletAccount(walletAccount)) {
  // walletAccount is now typed as TronWalletAccount
  console.log('Tron address:', walletAccount.address);
}
```

## Parameters

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

## Returns

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

## React

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

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

function TronWalletDisplay() {
  const { data: walletAccounts = [] } = useGetWalletAccounts();
  const tronAccount = walletAccounts.find(isTronWalletAccount);

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

## Related functions

* [getTronWeb](/javascript/reference/tron/get-tron-web) - Get the TronWeb instance from a wallet account
