> ## 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 para abrir el modal de inventario de wallet

## Importar

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

## Uso

```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>
  )
}
```

## Tipo de retorno: `UseOpenWalletModalReturnType`

El hook retorna un objeto con las siguientes propiedades:

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

### Propiedades

#### setOpenWalletModal

`(isOpen: boolean) => void`

Función para abrir o cerrar el modal de Wallet.

**Parámetros:**

| Parámetro | Type      | Description                                                        |
| --------- | --------- | ------------------------------------------------------------------ |
| `isOpen`  | `boolean` | Indica si el modal debe estar abierto (`true`) o cerrado (`false`) |

#### openWalletModalState

`boolean`

El estado actual de apertura del modal de Wallet (`true` si está abierto, `false` si está cerrado).

## Notas

Este hook proporciona métodos para controlar el modal de inventario de Wallet, que permite a los usuarios ver sus tokens y NFTs. El modal de Wallet muestra todos los tokens, NFTs y coleccionables presentes en la wallet conectada.
