Update comments (#1911)

This commit is contained in:
Leendert de Borst
2026-04-15 20:33:43 +02:00
committed by Leendert de Borst
parent 4a7ed739f2
commit f685bb8dce
2 changed files with 10 additions and 2 deletions

View File

@@ -154,7 +154,12 @@ export default function DeleteAccountScreen(): React.ReactNode {
const data = await webApi.post<DeleteAccountInitiateRequest, DeleteAccountInitiateResponse>('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

View File

@@ -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(