You’re viewing the 2.0 (LTS) docs. View the current 3.0 version of this page.
useUpdatePregenWalletIdentifier hook updates the identifier (email, phone, or custom ID) associated with an existing pregenerated wallet.
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Hook for updating the identifier associated with a pregenerated wallet
useUpdatePregenWalletIdentifier hook updates the identifier (email, phone, or custom ID) associated with an existing pregenerated wallet.
import { useUpdatePregenWalletIdentifier } from "@getpara/react-native-wallet";
import { useUpdatePregenWalletIdentifier } from "@getpara/react-native-wallet";
function UpdateIdentifierStep({ walletId, newEmail }: { walletId: string; newEmail: string }) {
const { updatePregenWalletIdentifierAsync, isPending } = useUpdatePregenWalletIdentifier();
const handleUpdate = async () => {
try {
await updatePregenWalletIdentifierAsync({
walletId,
newPregenId: { email: newEmail },
});
} catch (err) {
console.error(err);
}
};
return <Button title={isPending ? "Updating..." : "Update Identifier"} onPress={handleUpdate} disabled={isPending} />;
}