small fix for key + exception message

This commit is contained in:
Sebastiaan Pasma 2018-06-28 14:47:27 +02:00
commit 6ef1bca911
2 changed files with 2 additions and 2 deletions

View file

@ -47,7 +47,7 @@ angular.module('copayApp.services').factory('mobileSecureStorageService', functi
function (error) {
$log.debug('mss get failed. ' + error);
if (error.message === 'Failure in SecureStorage.get() - The specified item could not be found in the keychain' || // iOS
error.message === 'Key [_SS_profile] not found.') { // Android
error.message === 'Key [_SS_' + key + '] not found.') { // Android
// The callback expects no error, but also no value, if it cannot be found.
cb(null, null);
} else {

View file

@ -123,7 +123,7 @@ angular.module('copayApp.services')
var profileString = profile.toObj();
encryptionService.encrypt(profileString, function onProfileEncrypted(encryptionErr, encryptedProfile){
if (encryptionErr) {
$log.error('Failed to encrypt profile.', enctryptionErr);
$log.error('Failed to encrypt profile.', encryptionErr);
cb(encryptionErr, null);
return;
}