Appearance
Documentation / expo / needsRecovery
Function: needsRecovery()
needsRecovery(
s
):s is EmbeddedWalletNeedsRecoveryState
A type predicate to narrow the Embedded Wallet state to the Needs Recovery state.
Parameters
• s: EmbeddedWalletState
Returns
s is EmbeddedWalletNeedsRecoveryState
Example
ts
import {useEmbeddedWallet, needsRecovery} from '@privy-io/expo';
const wallet = useEmbeddedWallet();
{needsRecovery(wallet) && (
<button onClick={() => wallet.recovery('<user-passcode>')}>Recover Wallet</button>
)}