updateEmail
method from the usePrivy
hook:updateEmail
and updatePhone
methods, use the useUpdateAccount
hook:useUpdateAccount
hook accepts an options object with the following fields:onSuccess
callback will execute after a user has successfully updated either their phone or email on their Privy account.Within this callback, you can access:'email'
or 'sms'
.onError
callback will execute after a user initiates an update account attempt and there is an error, or if the user exits the update account flow prematurely.Within this callback, you can access: