1
0
mirror of https://github.com/bitwarden/mobile synced 2026-01-11 13:04:00 +00:00

[PM-2297] Fix state var crash

This commit is contained in:
André Bispo
2023-07-24 09:29:06 +01:00
parent acf7d9d9c4
commit cdacbafae4

View File

@@ -518,6 +518,10 @@ namespace Bit.Core.Services
var reconciledOptions = ReconcileOptions(new StorageOptions { UserId = userId },
await GetDefaultStorageOptionsAsync());
var deviceKeyB64 = await _storageMediatorService.GetAsync<string>(Constants.DeviceKeyKey(reconciledOptions.UserId), true);
if (string.IsNullOrEmpty(deviceKeyB64))
{
return null;
}
return new SymmetricCryptoKey(Convert.FromBase64String(deviceKeyB64));
}