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

# useOpenWalletModal

> Hook for opening the wallet inventory modal

## Import

```tsx theme={null}
import { useOpenWalletModal } from '@0xsequence/wallet-widget'
```

## Usage

```tsx theme={null}
import { useOpenWalletModal } from '@0xsequence/wallet-widget'

function App() {
  // Get the function to open/close the wallet modal
  const { setOpenWalletModal } = useOpenWalletModal()
  
  // Function to handle opening the wallet inventory
  const handleViewInventory = () => {
    setOpenWalletModal(true) // Open the wallet modal to view tokens
  }
  
  return (
    <button 
      onClick={handleViewInventory}
      title="Inventory"
    >
      View all tokens in your wallet
    </button>
  )
}
```

## Return Type: `UseOpenWalletModalReturnType`

The hook returns an object with the following properties:

```tsx theme={null}
type UseOpenWalletModalReturnType = {
  setOpenWalletModal: (isOpen: boolean) => void
  openWalletModalState: boolean
}
```

### Properties

#### setOpenWalletModal

`(isOpen: boolean) => void`

Function to open or close the Wallet modal.

**Parameters:**

| Parameter | Type      | Description                                                   |
| --------- | --------- | ------------------------------------------------------------- |
| `isOpen`  | `boolean` | Whether the modal should be open (`true`) or closed (`false`) |

#### openWalletModalState

`boolean`

The current open state of the Wallet modal (`true` if open, `false` if closed).

## Notes

This hook provides methods to control the Wallet Inventory modal that allows users to view their tokens and NFTs. The Wallet modal displays all tokens, NFTs and collectibles present in the connected wallet.
