Handle if GetState is null in biometric integrity check (#1082)

This commit is contained in:
Oscar Hinton 2020-09-21 18:34:22 +02:00 committed by GitHub
parent 0388738e02
commit a50e66faf4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -17,7 +17,10 @@ namespace Bit.iOS.Core.Services
public async Task<bool> SetupBiometricAsync()
{
var state = GetState();
if (state != null)
{
await _storageService.SaveAsync("biometricState", ToBase64(state));
}
return true;
}
@ -35,9 +38,13 @@ namespace Bit.iOS.Core.Services
else
{
var state = GetState();
if (state != null)
{
return FromBase64(oldState).Equals(state);
}
return true;
}
}
private NSData GetState()