Package: react-wallet-kit
Defined in: react-wallet-kit/src/providers/client/Types.tsx:543
Overview
Handles the add phone number flow.- This function opens a modal with the UpdatePhoneNumber component for adding and verifying the user’s phone number.
- If a phone number is provided, it will immediately send an OTP request to the user and display the OTP verification modal.
- Supports both manual entry and pre-filled phone numbers, as well as custom modal titles and subtitles.
- Uses the addPhoneNumberContinue helper to manage the OTP flow, verification, and update logic.
- After successful verification and update, the user details state is refreshed and an optional success page can be shown.
- Supports customizing the duration of the success page after update.
- Handles all error cases and throws a TurnkeyError with appropriate error codes.
Parameters
Response
A successful response returns the following fields:A promise that resolves to the userId of the user that was changed.