Hooks
useSignInEmail
Hook to retrieve the email address associated with the connected wallet
Import
Usage
Return Type
The hook returns:
- A
string
containing the email address when a wallet is connected and has an associated email null
when:- No wallet is connected
- The connected wallet has no associated email
- The wallet has been disconnected
State Management
The hook manages the email state by:
- Monitoring the wallet connection status
- Retrieving the stored email when a wallet connects
- Clearing the email when the wallet disconnects
- Persisting the email in local storage using the
WaasSignInEmail
key
Notes
This hook is designed to work with both:
- Sequence WaaS (Wallet-as-a-Service) wallets
- Universal wallet types
The hook integrates with Sequence’s storage system to maintain email persistence across sessions while ensuring proper cleanup when wallets are disconnected.
Was this page helpful?