Appearance
Documentation / react-auth / useSetWalletRecovery
Function: useSetWalletRecovery()
useSetWalletRecovery(
callbacks
?):Object
Use this hook to set user-controlled recovery on the embedded wallet, and to attach callbacks for successful recovery set
s, and recovery set
errors. Note that the callbacks will only fire for explicit setWalletRecovery
calls from the Privy SDK.
Parameters
• callbacks?: Object
• callbacks.onError?: (error
) => void
Callback that will execute in the case of a non-successful setWalletRecovery.
Param {PrivyErrorCode} - the corresponding error code
• callbacks.onSuccess?: (method
, wallet
) => void
Callback that will execute once a successful setWalletRecovery
completes.
ParamWallet- the walle]et
object that the recovery was set for
Returns
Object
setWalletRecovery - opens the Privy modal and prompts the user to set a password on the embedded wallet
setWalletRecovery
setWalletRecovery: (
o
?) =>Promise
<Wallet
>Parameters
• o?:
SetWalletRecoveryOptions
Returns
Promise
<Wallet
>