Documentation Index
Fetch the complete documentation index at: https://docs.sequence.xyz/llms.txt
Use this file to discover all available pages before exploring further.
Importar
import { useTransferFundsModal } from '@0xsequence/checkout'
Uso
import { useTransferFundsModal } from '@0xsequence/checkout'
import { useAccount } from 'wagmi'
function App() {
const { openTransferFundsModal } = useTransferFundsModal()
const { address } = useAccount()
const handleOpenTransfer = () => {
openTransferFundsModal({ walletAddress: address || '' })
}
return (
<div>
<button onClick={handleOpenTransfer}>
Receive Funds
</button>
</div>
)
}
Tipo de Retorno: UseTransferFundsModalReturnType
El hook retorna un objeto con las siguientes propiedades:
type UseTransferFundsModalReturnType = {
openTransferFundsModal: (settings: TransferFundsSettings) => void
closeTransferFundsModal: () => void
transferFundsSettings: TransferFundsSettings | null
}
Propiedades
openTransferFundsModal
(settings: TransferFundsSettings) => void
interface TransferFundsSettings {
walletAddress: string | Hex
onClose?: () => void
}
Función para abrir el modal de transferencia de fondos con la configuración especificada.
Parámetros:
| Parámetro | Type | Description |
|---|
settings | TransferFundsSettings | Objeto de configuración para el modal de transferencia de fondos |
closeTransferFundsModal
() => void
Función para cerrar el modal de transferencia de fondos.
transferFundsSettings
TransferFundsSettings | null
interface TransferFundsSettings {
walletAddress: string | Hex
onClose?: () => void
}
La configuración actual del modal de transferencia de fondos, o null si el modal está cerrado.