catch No public key when generating fingerprint

This commit is contained in:
Kyle Spearrin 2019-06-05 08:37:07 -04:00
parent 661cd79654
commit 046f25c223
1 changed files with 9 additions and 1 deletions

View File

@ -106,7 +106,15 @@ namespace Bit.App.Pages
public async Task FingerprintAsync()
{
var fingerprint = await _cryptoService.GetFingerprintAsync(await _userService.GetUserIdAsync());
List<string> fingerprint;
try
{
fingerprint = await _cryptoService.GetFingerprintAsync(await _userService.GetUserIdAsync());
}
catch(Exception e) when(e.Message == "No public key available.")
{
return;
}
var phrase = string.Join("-", fingerprint);
var text = string.Format("{0}:\n\n{1}", AppResources.YourAccountsFingerprint, phrase);
var learnMore = await _platformUtilsService.ShowDialogAsync(text, AppResources.FingerprintPhrase,