diff --git a/src/components/profile/ProfileSwitcher.tsx b/src/components/profile/ProfileSwitcher.tsx index 1c0ae74..d92f082 100644 --- a/src/components/profile/ProfileSwitcher.tsx +++ b/src/components/profile/ProfileSwitcher.tsx @@ -39,7 +39,11 @@ export default function ProfileSwitcher() { const handlePinSuccess = async (rehashed?: string | null) => { if (pinProfile) { if (rehashed) { - await updateProfile(pinProfile.id, { pin_hash: rehashed }); + try { + await updateProfile(pinProfile.id, { pin_hash: rehashed }); + } catch { + // Best-effort rehash: don't block profile switch if persistence fails + } } switchProfile(pinProfile.id); setPinProfile(null); diff --git a/src/pages/ProfileSelectionPage.tsx b/src/pages/ProfileSelectionPage.tsx index d76cbf6..b62f7ca 100644 --- a/src/pages/ProfileSelectionPage.tsx +++ b/src/pages/ProfileSelectionPage.tsx @@ -26,7 +26,11 @@ export default function ProfileSelectionPage() { const handlePinSuccess = async (rehashed?: string | null) => { if (pinProfileId) { if (rehashed) { - await updateProfile(pinProfileId, { pin_hash: rehashed }); + try { + await updateProfile(pinProfileId, { pin_hash: rehashed }); + } catch { + // Best-effort rehash: don't block profile switch if persistence fails + } } switchProfile(pinProfileId); setPinProfileId(null);