refreshUser
Refreshes the current user’s data from the server. This function fetches the latest authenticated user information from the backend and updates the local user state.
Use this when you need to ensure the user’s profile data is synchronized with the server, such as after making changes to the user’s account information.
Usage
Parameters
Returns
Promise<SdkUser> - A promise that resolves to the authenticated user object with updated data.
Examples
Basic usage
Listen to user changes
Components using useUser() re-render automatically when userChanged fires — no manual listener needed. If you need a side-effect on change, register it once at app level.
Handle wallet account changes
Components using useGetWalletAccounts() re-render automatically when walletAccountsChanged fires after a refreshUser() call.
Last modified on June 24, 2026