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

# useWalletSettings

> Hook to access and modify wallet configuration settings.

## Import

```tsx theme={null}
import { useWalletSettings } from '@0xsequence/connect'
```

## Usage

```tsx theme={null}
import { useWalletSettings } from '@0xsequence/connect'

function WalletConfigPanel() {
  const {
    displayedAssets,
    readOnlyNetworks,
    setDisplayedAssets,
    hideExternalConnectOptions,
    hideConnectedWallets,
    hideSocialConnectOptions
  } = useWalletSettings()

  const addNewAsset = (contractAddress: string, chainId: number) => {
    setDisplayedAssets([
      ...displayedAssets,
      { contractAddress, chainId }
    ])
  }

  const isNetworkReadOnly = (chainId: number) => {
    return readOnlyNetworks?.includes(chainId)
  }

  return (
    <div>
      <h2>Wallet Settings</h2>

      <div>
        <h3>Displayed Assets</h3>
        <ul>
          {displayedAssets.map(asset => (
            <li key={`${asset.chainId}-${asset.contractAddress}`}>
              Chain ID: {asset.chainId}, Contract: {asset.contractAddress}
            </li>
          ))}
        </ul>

        <button
          onClick={() => addNewAsset('0x1234...', 1)}
          disabled={isNetworkReadOnly(1)}
        >
          Add ETH Mainnet Asset
        </button>
      </div>

      <div>
        <h3>Network Status</h3>
        <ul>
          {[1, 137, 10].map(chainId => (
            <li key={chainId}>
              Chain {chainId}: {isNetworkReadOnly(chainId) ? 'Read-only' : 'Active'}
            </li>
          ))}
        </ul>
      </div>
    </div>
  )
}
```

## Return Type

```tsx theme={null}
interface WalletSettingsReturn {
  displayedAssets: Array<{
    contractAddress: string
    chainId: number
  }>
  readOnlyNetworks: number[] | undefined
  setDisplayedAssets: (assets: Array<{
    contractAddress: string
    chainId: number
  }>) => void
  hideExternalConnectOptions?: boolean
  hideConnectedWallets?: boolean
  hideSocialConnectOptions?: boolean
}
```

| Property                     | Type                                                  | Description                                                            |
| ---------------------------- | ----------------------------------------------------- | ---------------------------------------------------------------------- |
| `displayedAssets`            | `Array<{ contractAddress: string, chainId: number }>` | Tokens displayed in the wallet UI.                                     |
| `readOnlyNetworks`           | `number[] \| undefined`                               | Network IDs where users can view but cannot initiate new transactions. |
| `setDisplayedAssets`         | `(assets: ...) => void`                               | Updates the list of displayed tokens.                                  |
| `hideExternalConnectOptions` | `boolean \| undefined`                                | Hides external wallet connection options when `true`.                  |
| `hideConnectedWallets`       | `boolean \| undefined`                                | Hides the connected wallets section when `true`.                       |
| `hideSocialConnectOptions`   | `boolean \| undefined`                                | Hides social login options when `true`.                                |

Always check `readOnlyNetworks` before allowing transaction attempts, and validate contract addresses before adding assets.
