mirror of https://github.com/BTCPrivate/copay.git
migrate to unencrypted if encrypted
This commit is contained in:
parent
e78adf1bb8
commit
8e20c194d4
|
@ -60,6 +60,11 @@ angular.module('copayApp.services')
|
||||||
|
|
||||||
try {
|
try {
|
||||||
text = sjcl.decrypt(uuid, text);
|
text = sjcl.decrypt(uuid, text);
|
||||||
|
|
||||||
|
$log.info('Migrating to unencrypted profile');
|
||||||
|
return storage.set('profile', text, function(err) {
|
||||||
|
return cb(err, text);
|
||||||
|
});
|
||||||
} catch(e) {
|
} catch(e) {
|
||||||
$log.warn('Decrypt error: ', e);
|
$log.warn('Decrypt error: ', e);
|
||||||
return cb('Could not decrypt storage: device ID mismatch');
|
return cb('Could not decrypt storage: device ID mismatch');
|
||||||
|
|
Loading…
Reference in New Issue