From f685bb8dce7d451775b83a3755ac563ca7c8b2f3 Mon Sep 17 00:00:00 2001 From: Leendert de Borst Date: Wed, 15 Apr 2026 20:33:43 +0200 Subject: [PATCH] Update comments (#1911) --- .../app/(tabs)/settings/security/delete-account.tsx | 7 ++++++- apps/mobile-app/hooks/useVaultMutate.ts | 5 ++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/apps/mobile-app/app/(tabs)/settings/security/delete-account.tsx b/apps/mobile-app/app/(tabs)/settings/security/delete-account.tsx index c3a062a8b..ebcc51b60 100644 --- a/apps/mobile-app/app/(tabs)/settings/security/delete-account.tsx +++ b/apps/mobile-app/app/(tabs)/settings/security/delete-account.tsx @@ -154,7 +154,12 @@ export default function DeleteAccountScreen(): React.ReactNode { const data = await webApi.post('Auth/delete-account/initiate', deleteAccountInitiateRequest); const currentSalt = data.salt; const currentServerEphemeral = data.serverEphemeral; - const srpIdentity = data.srpIdentity; + + /** + * Use srpIdentity from server response if available, otherwise fall back to username. + * Note: the fallback can be removed in the future after 0.26.0+ is deployed. + */ + const srpIdentity = data.srpIdentity ?? username; setLoadingStatus(t('settings.securitySettings.deleteAccount.verifyingWithServer')); // Convert base64 string to hex string diff --git a/apps/mobile-app/hooks/useVaultMutate.ts b/apps/mobile-app/hooks/useVaultMutate.ts index 8ba5ac85d..d1f2139dd 100644 --- a/apps/mobile-app/hooks/useVaultMutate.ts +++ b/apps/mobile-app/hooks/useVaultMutate.ts @@ -185,7 +185,10 @@ export function useVaultMutate() : { throw new Error(t('common.errors.unknownError')); } - // Use srpIdentity from server response if available, otherwise fall back to username. + /** + * Use srpIdentity from server response if available, otherwise fall back to username. + * Note: the fallback can be removed in the future after 0.26.0+ is deployed. + */ const srpIdentity = data.srpIdentity ?? username; const privateKey = await NativeVaultManager.srpDerivePrivateKey(currentSalt, srpIdentity, currentPasswordHashString); const newClientSession = await NativeVaultManager.srpDeriveSession(